搜索
首页web前端html教程Emoji 键盘 SDK_html/css_WEB-ITnose

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"
  • 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
  • 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>

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"

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;    }

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

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];}

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];

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);}

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];}

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;

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}

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

self.meTextInputView.displayCameraButton = NO;

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    }

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];}

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;    }

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

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
HTML和代码:仔细观察术语HTML和代码:仔细观察术语Apr 10, 2025 am 09:28 AM

htmlisaspecifictypefodyfocusedonstructuringwebcontent,而“代码” badlyLyCludEslanguagesLikeLikejavascriptandPytyPythonForFunctionality.1)htmldefineswebpagertuctureduseTags.2)“代码”代码“ code” code code code codeSpassSesseseseseseseseAwiderRangeLangeLangeforLageforLogageforLogicIctInterract

HTML,CSS和JavaScript:Web开发人员的基本工具HTML,CSS和JavaScript:Web开发人员的基本工具Apr 09, 2025 am 12:12 AM

HTML、CSS和JavaScript是Web开发的三大支柱。1.HTML定义网页结构,使用标签如、等。2.CSS控制网页样式,使用选择器和属性如color、font-size等。3.JavaScript实现动态效果和交互,通过事件监听和DOM操作。

HTML,CSS和JavaScript的角色:核心职责HTML,CSS和JavaScript的角色:核心职责Apr 08, 2025 pm 07:05 PM

HTML定义网页结构,CSS负责样式和布局,JavaScript赋予动态交互。三者在网页开发中各司其职,共同构建丰富多彩的网站。

HTML容易为初学者学习吗?HTML容易为初学者学习吗?Apr 07, 2025 am 12:11 AM

HTML适合初学者学习,因为它简单易学且能快速看到成果。1)HTML的学习曲线平缓,易于上手。2)只需掌握基本标签即可开始创建网页。3)灵活性高,可与CSS和JavaScript结合使用。4)丰富的学习资源和现代工具支持学习过程。

HTML中起始标签的示例是什么?HTML中起始标签的示例是什么?Apr 06, 2025 am 12:04 AM

AnexampleOfAstartingTaginHtmlis,beginSaparagraph.startingTagSareEssentialInhtmlastheyInitiateEllements,defiteTheeTheErtypes,andarecrucialforsstructuringwebpages wepages webpages andConstructingthedom。

如何利用CSS的Flexbox布局实现菜单中虚线分割效果的居中对齐?如何利用CSS的Flexbox布局实现菜单中虚线分割效果的居中对齐?Apr 05, 2025 pm 01:24 PM

如何设计菜单中的虚线分割效果?在设计菜单时,菜名和价格的左右对齐通常不难实现,但中间的虚线或点如何...

在线代码编辑器究竟用什么HTML元素实现代码输入?在线代码编辑器究竟用什么HTML元素实现代码输入?Apr 05, 2025 pm 01:21 PM

网页代码编辑器中的HTML元素分析许多在线代码编辑器允许用户输入HTML、CSS和JavaScript代码。最近,有人提出了一...

React静态页面构建:如何用react-app-rewired避免代码压缩?React静态页面构建:如何用react-app-rewired避免代码压缩?Apr 05, 2025 pm 01:18 PM

关于使用react-app-rewired构建静态页面时如何避免代码压缩许多开发者在使用React构建静态页面时,希望在交付给�...

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
3 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
3 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您听不到任何人,如何修复音频
3 周前By尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解锁Myrise中的所有内容
3 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

功能强大的PHP集成开发环境

VSCode Windows 64位 下载

VSCode Windows 64位 下载

微软推出的免费、功能强大的一款IDE编辑器

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境