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" = "56debbdf1cb0fbf041c63c015fb19ac9, {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

HTMLの役割は、タグと属性を使用してWebページの構造とコンテンツを定義することです。 1。HTMLは、読みやすく理解しやすいようなタグを介してコンテンツを整理します。 2。アクセシビリティとSEOを強化するには、セマンティックタグなどを使用します。 3. HTMLコードの最適化により、Webページの読み込み速度とユーザーエクスペリエンスが向上する可能性があります。

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

メニューで点線のラインセグメンテーション効果を設計する方法は?メニューを設計するときは、通常、皿の名前と価格の間に左右に合わせることは難しくありませんが、真ん中の点線またはポイントはどうですか...

WebコードエディターのHTML要素分析では、多くのオンラインコードエディターを使用すると、ユーザーはHTML、CSS、およびJavaScriptコードを入力できます。最近、誰かが提案した...


ホットAIツール

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

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

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

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

人気の記事

ホットツール

SublimeText3 Linux 新バージョン
SublimeText3 Linux 最新バージョン

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

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

VSCode Windows 64 ビットのダウンロード
Microsoft によって発売された無料で強力な IDE エディター

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。
