目次
Makemoji SDK
以下の機能が含まれます
ライブラリのセットアップ
SDK の使用法
初期化
セットアップMakemoji TextInput
分離されたテキスト入力
キーボードと入力サイズの変更の処理
メッセージの送信
カメラ ボタン
Hypermoji - URL 付き絵文字
メッセージの表示
Emoji Wall
Reactions
FAQ
Service Performance
ホームページ ウェブフロントエンド htmlチュートリアル 絵文字キーボード SDK_html/css_WEB-ITnose

絵文字キーボード SDK_html/css_WEB-ITnose

Jun 21, 2016 am 08:46 AM

Makemoji SDK

Makemoji は、モバイル アプリ用の無料の絵文字キーボードです。

キーボード SDK をインストールすると、アプリのすべてのユーザーが新しいトレンドの絵文字に即座にアクセスできるようになります。私たちの目標は、ユーザー エンゲージメントを高めるだけでなく、センチメント (ユーザーがどのように感じるか) と親和性 (ユーザーが好むもの) に関する実用的なリアルタイム データを提供することです。この広範なデータ収集により、ユーザーごとおよび企業の評価がユーザーベースとともに増加します。

以下の機能が含まれます

  • 無料絵文字の豊富なライブラリ
  • 722標準 Unicode 絵文字
  • Makemoji Flashtag インライン検索システム

  • 新しい絵文字は動的にロードされ、アプリの更新は必要ありません
  • 分析ダッシュボードと CMS

SDK キーを取得するには、sdk@makemoji.com にメールしてください。

詳細

ライブラリのセットアップ

  • 依存関係に CocoaPods を使用している場合は、以下を含めてください。

    pod "Makemoji-SDK"
    ログイン後にコピー
  • CocoaPods を使用していない場合は、必ず次のライブラリを含めてください。

    • AFNetworking 2.6.3
    • SDWebImage 3.7.3
  • MakemojiSDK フォルダーをプロジェクトにドラッグします。

  • Xcode で、アプリターゲットをクリックします ->構築フェーズ ->バイナリをライブラリにリンクし、次のライブラリを追加します。

    libsqlite3    libxml2    libz
ログイン後にコピー
  • iOS 9 では、AWS S3 の例外をライブラリに含める必要があります。 App Transport の Info.plist。
<dict>    <key>NSAllowsArbitraryLoads</key>    <true/>    <key>s3.amazonaws.com</key>    <dict>        <key>NSExceptionAllowsInsecureHTTPLoads</key>        <true/>    </dict></dict>
ログイン後にコピー

SDK の使用法

初期化

MakemojiSDK の使用を開始するには、まず、 AppDelegate.

Makemoji ヘッダー ファイルを AppDelegate.m ファイルに追加します。

#import "MakemojiSDK.h"
ログイン後にコピー

次に、起動時に SDK キーをセットアップします。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {        // Override point for customization after application launch.        // setup your SDK key        [MakemojiSDK setSDKKey:@"YOUR-SDK-KEY"];        return YES;    }
ログイン後にコピー

セットアップMakemoji TextInput

次に、ビュー コントローラーをセットアップし、METextInputView をプロパティとして追加する必要があります。これを METextInputViewDelegate プロトコルに準拠させる必要もあります。

#import <UIKit/UIKit.h>    #import "METextInputView.h"    @interface ViewController : UIViewController <METextInputViewDelegate>    @property (nonatomic, retain) METextInputView * meTextInputView;    @end
ログイン後にコピー

viewDidLoad または init 中にビュー コントローラーで METextInputView を初期化します。 showKeyboard メソッドを使用して、テキスト入力フィールドをファーストレスポンダにします。

- (void)viewDidLoad {    [super viewDidLoad];    self.meTextInputView = [[METextInputView alloc] initWithFrame:CGRectZero];    self.meTextInputView.delegate = self;    [self.view addSubview:self.meTextInputView];}-(void)viewDidAppear:(BOOL)animated {    [super viewDidAppear:animated];    [self.meTextInputView showKeyboard];}
ログイン後にコピー

分離されたテキスト入力

キーボードから分離されたテキスト入力が必要な場合は、 detachTextInputView メソッドを呼び出してから、textInputContainerView をビューに追加する必要があります。

[self.meTextInputView detachTextInputView:YES];    [self.view addSubview:self.meTextInputView.textInputContainerView];
ログイン後にコピー

このモードでは送信ボタンとカメラ ボタンが非表示になるため、sendMessage メソッドにボタンをアタッチして呼び出す必要があります。テキストのキャプチャをトリガーします。

これを設定する方法の完全な例については、付属の MakemojiSDKDemo アプリを参照してください。

キーボードと入力サイズの変更の処理

次の処理を行う必要があります。キーボードの外観のサイズ変更とテキスト入力のサイズの変更。これらのイベントが発生すると、didChangeFrame デリゲート メソッドが呼び出されます。

-(void)meTextInputView:(METextInputView *)inputView didChangeFrame:(CGRect)frame {    self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, self.meTextInputView.frame.origin.y);}
ログイン後にコピー

メッセージの送信

didTapSend デリゲート コールバックは、[送信] ボタンをクリックしたときに MakemojiSDK テキスト ビューからプレーンテキストと HTML の辞書を提供します。

-(void)meTextInputView:(METextInputView *)inputView didTapSend:(NSDictionary *)message {    NSLog(@"%@", message);    // send message to your backend here    [self.messages addObject:message];    [self.tableView reloadData];}
ログイン後にコピー

messageDictionary は次の

{"html" を返します。 : 「HTML によるメッセージ」、「プレーンテキスト」 : "メッセージはプレーンテキストに変換されました"}

これをバックエンドに送信してメッセージを保存します。

displaySendButton を設定することで、組み込みの送信ボタンを表示または非表示にできます。 METextInputView のプロパティ

self.meTextInputView.displaySendButton = NO;
ログイン後にコピー

カメラ ボタン

これはカスタマイズ可能な標準の UIButton です。カメラ ボタンのアクションを処理するには、didTapCameraButton デリゲート コールバックを使用します。

-(void)meTextInputView:(METextInputView *)inputView didTapCameraButton:(UIButton*)cameraButton {    // Present image controller}
ログイン後にコピー

METextInputView の displayCameraButton プロパティを設定することで、内蔵カメラを表示または非表示にできます

self.meTextInputView.displayCameraButton = NO;
ログイン後にコピー

Hypermoji - URL 付き絵文字

ハイパー文字 (URL リンク付き絵文字) をタップしたときの Web ページの表示を処理するには、didTapHypermoji デリゲート コールバックを使用します

// handle tapping of links (Hypermoji)    -(void)meTextInputView:(METextInputView *)inputView didTapHypermoji:(NSString*)urlString {        // open webview here    }
ログイン後にコピー

メッセージの表示

HTML メッセージを表示するために最適化された UITableViewCells が含まれています。 MEChatTableViewCell は、iMessage の表示動作を模倣し、簡単な画像添付機能を備えています。 MESimpleTableViewCell は、広範なカスタマイズ オプションのために提供されています。

HTML メッセージの行の高さを指定するには、cellHeightForHTML メソッドを使用します。このメソッドは、パフォーマンスを向上させるためにセルの高さをキャッシュします。

// determine row height with HTML- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {    if (self.meTextInputView == nil) {        return 0;    }    NSDictionary * message = [self.messages objectAtIndex:indexPath.row];    return [self.meTextInputView cellHeightForHTML:[message objectForKey:@"html"]                                       atIndexPath:indexPath                                      maxCellWidth:self.tableView.frame.size.width                                         cellStyle:MECellStyleChat];}
ログイン後にコピー

setCellDisplay を使用して、左側または右側に表示するように MEChatTableViewCell を設定できます。これは、各メッセージの HTML を設定する前に行う必要があります。

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {        static NSString *CellIdentifier = @"Cell";        MEChatTableViewCell  *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];        if (cell == nil) {            cell = [[MEChatTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];        }        // display chat cell on right side        [cell setCellDisplay:MECellDisplayRight];        // display chat cell on left side        if (indexPath.row % 2) {            [cell setCellDisplay:MECellDisplayLeft];        }        NSDictionary * message = [self.messages objectAtIndex:indexPath.row];        [cell setHTMLString:[message objectForKey:@"html"]];        return cell;    }
ログイン後にコピー

Emoji Wall

The Emoji Wall is a View Controller that allows your users to select one emoji from the makemoji library or the built-in iOS emoji.

To display the emoji wall, use the following:

// initialize the emoji wall view controller    MEEmojiWall * emojiWall = [[MEEmojiWall alloc] init];    emojiWall.delegate = self;    emojiWall.modalPresentationStyle = UIModalPresentationOverCurrentContext;    // wrap view controller in navigation controller    UINavigationController *navigationController =    [[UINavigationController alloc] initWithRootViewController:emojiWall];    [navigationController.navigationBar setBarTintColor:[UIColor blackColor]];    [navigationController.navigationBar setBarStyle:UIBarStyleBlackTranslucent];    [navigationController.navigationBar setTintColor:[UIColor whiteColor]];    // present the emoji wall as a modal    [self presentViewController:navigationController animated:YES completion:nil];
ログイン後にコピー

The search bar can be disabled by using the following when instantiating the controller

emojiWall.shouldDisplaySearch = NO;
ログイン後にコピー

When a user selects an emoji from the wall, the following NSDictionary is returned to the Emoji Wall delegate.

For Makemoji emoji:

{ "emoji_id" = 935; "emoji_type" = makemoji; "image_object" = "<UIImage: 0x7fdaa3f2e0a0>, {110, 110}"; "image_url" = "http://d1tvcfe0bfyi6u.cloudfront.net/emoji/935-large@2x.png"; name = Amused; }

For iOS emoji:

{ "emoji_id" = 18; "emoji_type" = native; name = "pensive face"; "unicode_character" = "\Ud83d\Ude14"; }

Reactions

Makemoji reactions allow you to add inline emoji reactions to any view. Here's how you set this up.

You will first want to init the reaction view and give it a frame, typically a height of 30 is the best, but you can use anyting from 25 to 40.

    self.reactionView = [[MEReactionView alloc] initWithFrame:CGRectMake(0, 0, your_width, 30)];
ログイン後にコピー

You will then want to provide the reaction view with a content id, which is a NSString. THis should be unique to the content you want to associate these reactions to.

    self.reactionView.contentId = @"article123";
ログイン後にコピー

Setting this contentId will retrieve available reaction data as well as retrieve your default reaction set.

If you want to listen for user reacting to this view, observe the MEReactionNotification key.

The notification will include the reaction data that was selected.

FAQ

  • The Makemoji SDK is completely free.

  • All emojis are served from AWS S3.

  • We do not store your messages. Your app backend will have to process and serve messages created with our SDK.

  • We do not send push notifications.

  • Your app's message volume does not affect the performance of our SDK.

  • Messages are composed of simple HTML containing image and paragraph tags. Formatting is presented as inline CSS.

  • Will work with any built-in iOS keyboard or return type

  • All network operations happen asyncronously and do not block the User Interface

Service Performance

  • Avg Service Repsonse Time: 100ms

  • Hosted with AWS using Elastic Beanstalk & RDS

  • Scales seamlessly to meet traffic demands

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

&lt; Progress&gt;の目的は何ですか 要素? &lt; Progress&gt;の目的は何ですか 要素? Mar 21, 2025 pm 12:34 PM

この記事では、HTML&lt; Progress&gt;について説明します。要素、その目的、スタイリング、および&lt; meter&gt;との違い要素。主な焦点は、&lt; Progress&gt;を使用することです。タスクの完了と&lt; Meter&gt; statiの場合

&lt; datalist&gt;の目的は何ですか 要素? &lt; datalist&gt;の目的は何ですか 要素? Mar 21, 2025 pm 12:33 PM

この記事では、HTML&lt; Datalist&GT;について説明します。オートコンプリートの提案を提供し、ユーザーエクスペリエンスの改善、エラーの削減によりフォームを強化する要素。

HTML5のクロスブラウザー互換性のベストプラクティスは何ですか? HTML5のクロスブラウザー互換性のベストプラクティスは何ですか? Mar 17, 2025 pm 12:20 PM

記事では、HTML5クロスブラウザーの互換性を確保するためのベストプラクティスについて説明し、機能検出、プログレッシブエンハンスメント、およびテスト方法に焦点を当てています。

&lt; meter&gt;の目的は何ですか 要素? &lt; meter&gt;の目的は何ですか 要素? Mar 21, 2025 pm 12:35 PM

この記事では、html&lt; meter&gt;について説明します。要素は、範囲内でスカラーまたは分数値を表示するために使用され、Web開発におけるその一般的なアプリケーション。それは差別化&lt; Meter&gt; &lt; Progress&gt;およびex

HTML5&lt; time&gt;を使用するにはどうすればよいですか 日付と時刻を意味的に表す要素? HTML5&lt; time&gt;を使用するにはどうすればよいですか 日付と時刻を意味的に表す要素? Mar 12, 2025 pm 04:05 PM

この記事では、html5&lt; time&gt;について説明します。セマンティックデート/時刻表現の要素。 人間の読み取り可能なテキストとともに、マシンの読みやすさ(ISO 8601形式)のDateTime属性の重要性を強調し、Accessibilitを増やします

HTML5フォーム検証属性を使用してユーザー入力を検証するにはどうすればよいですか? HTML5フォーム検証属性を使用してユーザー入力を検証するにはどうすればよいですか? Mar 17, 2025 pm 12:27 PM

この記事では、ブラウザのユーザー入力を直接検証するために、必要、パターン、MIN、MAX、および長さの制限などのHTML5フォーム検証属性を使用して説明します。

ビューポートメタタグとは何ですか?レスポンシブデザインにとってなぜそれが重要なのですか? ビューポートメタタグとは何ですか?レスポンシブデザインにとってなぜそれが重要なのですか? Mar 20, 2025 pm 05:56 PM

この記事では、モバイルデバイスのレスポンシブWebデザインに不可欠なViewportメタタグについて説明します。適切な使用により、最適なコンテンツのスケーリングとユーザーの相互作用が保証され、誤用が設計とアクセシビリティの問題につながる可能性があることを説明しています。

&lt; iframe&gt;の目的は何ですか タグ?使用する際のセキュリティ上の考慮事項は何ですか? &lt; iframe&gt;の目的は何ですか タグ?使用する際のセキュリティ上の考慮事項は何ですか? Mar 20, 2025 pm 06:05 PM

この記事では、&lt; iframe&gt;外部コンテンツをWebページ、その一般的な用途、セキュリティリスク、およびオブジェクトタグやAPIなどの代替案に埋め込む際のタグの目的。

See all articles