Jadual Kandungan
Makemoji SDK
Features Include
Library Setup
SDK Usage
Initialization
Setup a the Makemoji TextInput
Detached Text Input
Handling Keyboard & Input Size Changes
Send a Message
Camera Button
Hypermoji - Emoji with a URL
Displaying Messages
Emoji Wall
Reactions
FAQ
Service Performance
Rumah hujung hadapan web html tutorial Emoji 键盘 SDK_html/css_WEB-ITnose

Emoji 键盘 SDK_html/css_WEB-ITnose

Jun 21, 2016 am 08:46 AM

Makemoji SDK

Makemojiis a free emoji keyboard for mobile apps.

By installing our keyboard SDK every user of your app will instantly have access to new and trending emojis. Our goal is to increase user engagement as well as provide actionable real time data on sentiment (how users feel) and affinity (what users like). With this extensive data collection your per-user & company valuation will increase along with your user-base.

Features Include

  • Extensive library of free emoji
  • 722 standard Unicode emoji
  • Makemoji Flashtag inline search system

  • New emoji load dynamically and does not require a app update
  • Analytics Dashboard & CMS

To obtain your SDK key please email: sdk@makemoji.com

Learn More

Library Setup

  • If you are using CocoaPods for dependencies, include the following.

    pod "Makemoji-SDK"
    Salin selepas log masuk
  • If your are not using CocoaPods, be sure to include the following libraries.

    • AFNetworking 2.6.3
    • SDWebImage 3.7.3
  • Drag the MakemojiSDK folder to your project.

  • In Xcode, click on your App Target -> Build Phases -> Link Binary with Libraries and add the following libraries.

    libsqlite3    libxml2    libz
Salin selepas log masuk
  • With iOS 9, you will need to include a exception for AWS S3 in your Info.plist for App Transport.
<dict>    <key>NSAllowsArbitraryLoads</key>    <true/>    <key>s3.amazonaws.com</key>    <dict>        <key>NSExceptionAllowsInsecureHTTPLoads</key>        <true/>    </dict></dict>
Salin selepas log masuk

SDK Usage

Initialization

To start using the MakemojiSDK you will first have to add a few lines to your AppDelegate.

Add the Makemoji header file to you AppDelegate.m file.

#import "MakemojiSDK.h"
Salin selepas log masuk

Then on launch, setup your SDK key.

- (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;    }
Salin selepas log masuk

Setup a the Makemoji TextInput

Next you will need setup a view controller and add the METextInputView as a property. You will also need to make this conform to the METextInputViewDelegate protocol.

#import <UIKit/UIKit.h>    #import "METextInputView.h"    @interface ViewController : UIViewController <METextInputViewDelegate>    @property (nonatomic, retain) METextInputView * meTextInputView;    @end
Salin selepas log masuk

In your view controller during viewDidLoad or init, initialize the METextInputView. Use the showKeyboard method to make the text input field the first responder.

- (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];}
Salin selepas log masuk

Detached Text Input

If you need the Text Input detached from the keyboard, you will need to call the detachTextInputView method and then add textInputContainerView to your view.

[self.meTextInputView detachTextInputView:YES];    [self.view addSubview:self.meTextInputView.textInputContainerView];
Salin selepas log masuk

Since the Send Button and Camera button are hidden in this mode, you will need to call attach a button to the sendMessage method to trigger capturing the text.

See the included MakemojiSDKDemo app for a full example of how to set this up.

Handling Keyboard & Input Size Changes

You will need to handle keyboard appearance resizing and text input size changes. The didChangeFrame delegate method is called when these events occur.

-(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);}
Salin selepas log masuk

Send a Message

The didTapSend delegate callback gives you a dictionary of plaintext and HTML from the MakemojiSDK text view when the Send button is tapped.

-(void)meTextInputView:(METextInputView *)inputView didTapSend:(NSDictionary *)message {    NSLog(@"%@", message);    // send message to your backend here    [self.messages addObject:message];    [self.tableView reloadData];}
Salin selepas log masuk

The messageDictionary returns the following

{"html" : "Your Message with HTML", "plaintext" : "Your message translated to plaintext"}

You would then send this to your backend to store the message.

You can show or hide the built-in send button by setting the displaySendButton property on METextInputView

self.meTextInputView.displaySendButton = NO;
Salin selepas log masuk

Camera Button

This is a standard UIButton that can be customized. To handle a action for the camera button use the didTapCameraButton delegate callback.

-(void)meTextInputView:(METextInputView *)inputView didTapCameraButton:(UIButton*)cameraButton {    // Present image controller}
Salin selepas log masuk

You can show or hide the built-in camera by setting the displayCameraButton property on METextInputView

self.meTextInputView.displayCameraButton = NO;
Salin selepas log masuk

Hypermoji - Emoji with a URL

To handle the display of a webpage when tapping on a Hypermoji ( a emoji with a URL link), use the didTapHypermoji delegate callback

// handle tapping of links (Hypermoji)    -(void)meTextInputView:(METextInputView *)inputView didTapHypermoji:(NSString*)urlString {        // open webview here    }
Salin selepas log masuk

Displaying Messages

We have included a optimized UITableViewCells for displaying HTML messages. MEChatTableViewCell mimics iMessage display behavior and includes a simple image attachment feature. MESimpleTableViewCell is provided for extensive customization options.

Use the cellHeightForHTML method to give you the row height for a html message. This method caches cell heights for increased performance.

// 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];}
Salin selepas log masuk

You can set the MEChatTableViewCell to display on the left or right hand side using setCellDisplay. This should happen before setting your HTML for each message.

- (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;    }
Salin selepas log masuk

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];
Salin selepas log masuk

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

emojiWall.shouldDisplaySearch = NO;
Salin selepas log masuk

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" = ", {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)];
Salin selepas log masuk

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";
Salin selepas log masuk

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

Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Alat AI Hot

Undresser.AI Undress

Undresser.AI Undress

Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover

AI Clothes Remover

Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool

Undress AI Tool

Gambar buka pakaian secara percuma

Clothoff.io

Clothoff.io

Penyingkiran pakaian AI

AI Hentai Generator

AI Hentai Generator

Menjana ai hentai secara percuma.

Artikel Panas

R.E.P.O. Kristal tenaga dijelaskan dan apa yang mereka lakukan (kristal kuning)
3 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Tetapan grafik terbaik
3 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Cara Memperbaiki Audio Jika anda tidak dapat mendengar sesiapa
3 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: Cara Membuka Segala -galanya Di Myrise
3 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌

Alat panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Apakah tujuan & lt; kemajuan & gt; unsur? Apakah tujuan & lt; kemajuan & gt; unsur? Mar 21, 2025 pm 12:34 PM

Artikel ini membincangkan html & lt; kemajuan & gt; elemen, tujuan, gaya, dan perbezaan dari & lt; meter & gt; elemen. Tumpuan utama adalah menggunakan & lt; kemajuan & gt; untuk menyelesaikan tugas dan & lt; meter & gt; untuk stati

Apakah tujuan & lt; DATALIST & GT; unsur? Apakah tujuan & lt; DATALIST & GT; unsur? Mar 21, 2025 pm 12:33 PM

Artikel ini membincangkan html & lt; datalist & gt; elemen, yang meningkatkan bentuk dengan menyediakan cadangan autokomplete, meningkatkan pengalaman pengguna dan mengurangkan kesilapan. Kira -kira: 159

Apakah amalan terbaik untuk keserasian penyemak imbas dalam HTML5? Apakah amalan terbaik untuk keserasian penyemak imbas dalam HTML5? Mar 17, 2025 pm 12:20 PM

Artikel membincangkan amalan terbaik untuk memastikan keserasian silang pelayar HTML5, memberi tumpuan kepada pengesanan ciri, peningkatan progresif, dan kaedah ujian.

Apakah tujuan & lt; meter & gt; unsur? Apakah tujuan & lt; meter & gt; unsur? Mar 21, 2025 pm 12:35 PM

Artikel ini membincangkan html & lt; meter & gt; elemen, digunakan untuk memaparkan nilai skalar atau pecahan dalam julat, dan aplikasi umum dalam pembangunan web. Ia membezakan & lt; meter & gt; dari & lt; kemajuan & gt; dan Ex

Bagaimana saya menggunakan html5 & lt; masa & gt; elemen untuk mewakili tarikh dan masa secara semantik? Bagaimana saya menggunakan html5 & lt; masa & gt; elemen untuk mewakili tarikh dan masa secara semantik? Mar 12, 2025 pm 04:05 PM

Artikel ini menerangkan html5 & lt; time & gt; elemen untuk perwakilan tarikh/masa semantik. Ia menekankan pentingnya atribut DateTime untuk pembacaan mesin (format ISO 8601) bersama teks yang boleh dibaca manusia, meningkatkan aksesibilit

Bagaimana saya menggunakan atribut pengesahan borang html5 untuk mengesahkan input pengguna? Bagaimana saya menggunakan atribut pengesahan borang html5 untuk mengesahkan input pengguna? Mar 17, 2025 pm 12:27 PM

Artikel ini membincangkan menggunakan atribut pengesahan bentuk HTML5 seperti had, corak, min, max, dan panjang untuk mengesahkan input pengguna secara langsung dalam penyemak imbas.

Apakah tag meta viewport? Mengapa penting untuk reka bentuk responsif? Apakah tag meta viewport? Mengapa penting untuk reka bentuk responsif? Mar 20, 2025 pm 05:56 PM

Artikel ini membincangkan tag Meta Viewport, penting untuk reka bentuk web responsif pada peranti mudah alih. Ia menerangkan bagaimana penggunaan yang betul memastikan skala kandungan yang optimum dan interaksi pengguna, sementara penyalahgunaan boleh membawa kepada isu reka bentuk dan kebolehaksesan.

Apakah tujuan & lt; iframe & gt; Tag? Apakah pertimbangan keselamatan semasa menggunakannya? Apakah tujuan & lt; iframe & gt; Tag? Apakah pertimbangan keselamatan semasa menggunakannya? Mar 20, 2025 pm 06:05 PM

Artikel ini membincangkan & lt; iframe & gt; Tujuan TAG dalam membenamkan kandungan luaran ke dalam halaman web, kegunaan umum, risiko keselamatan, dan alternatif seperti tag objek dan API.

See all articles