类引用说明

BQMM/MMEmotionCentre.h

说明: 表情MM iOS SDK核心头文件

  • MMEmotionCentreDelegate协议方法 - 表情点击回调
- (void)didSelectEmoji:(MMEmoji *)emoji;
  • didSelectTipEmoji - 点击联想表情的回调
- (void)didSelectTipEmoji:(MMEmoji *)emoji;
  • didSendWithInput - 点击表情键盘上发送按钮的代理
- (void)didSendWithInput:(UIResponder<UITextInput> *)input;
  • tapOverlay - 当表情键盘打开时,点击输入框的代理
- (void)tapOverlay;
  • 指定表情点击回调代理
@property (nonatomic, weak) id<MMEmotionCentreDelegate> delegate;
  • SDK模式 默认为MMSDKModeIM
@property (nonatomic) MMSDKMode sdkMode;
  • SDK语言 默认为MMLanguageChinese
@property (nonatomic) MMLanguage sdkLanguage;
  • SDK区域 默认为MMRegionChina
@property (nonatomic) MMRegion sdkRegion;
  • supportedMixedTextImage - 是否支持图文混排消息,默认为YES
@property (nonatomic) BOOL supportedMixedTextImage;
  • defaultCentre - 表情管理中心默认实例(单例)
+ (instancetype)defaultCentre;
  • 当前SDK的版本
- (NSString *)version;
  • userId - (可选)如传递当前登录userId,后期可获取特定用户表情使用习惯等
- (void)setUserId:(NSString *)userId;
  • 使用第三方key和id来初始化SDK
- (void)setAppkey:(nonnull NSString *)appkey platformId:(nonnull NSString *)platformId;
  • setAppId 注册appId&appSecret
- (void)setAppId:(NSString *)appId secret:(NSString *)secret;
  • setTheme - 设置表情商店主题,主题对象参考 MMTheme.h
- (void)setTheme:(MMTheme *)theme;
  • setDefaultEmojiArray - 设置自定义默认表情包
- (void)setDefaultEmojiArray:(nonnull NSArray<NSString *> *)emojiArray;
  • attachEmotionKeyboardToInput - 切换到到表情MM键盘视图
- (void)attachEmotionKeyboardToInput:(UIResponder<UITextInput> *)input;
  • switchToDefaultKeyboard - 切换到到默认键盘视图
- (void)switchToDefaultKeyboard;
  • shouldShowShotcutPopoverAboveView - 根据文字弹出候选表情
- (void)shouldShowShotcutPopoverAboveView:(UIView *)attchedView withInput:(UIResponder<UITextInput> *)input;
// attachedView: 表情提示bubble出现在这个view上
// input: 侦测这个input试图的输入变化
  • setUnicodeEmojiTabEnabled - 是否显示unicode emoji表情tab,默认YES显示
- (void)setUnicodeEmojiTabEnabled: (BOOL)enable;
  • controllerForEmotionCode - 对应emojiCode的单个表情的详情界面
- (UIViewController *)controllerForEmotionCode:(NSString *)emojiCode;
  • presentShopViewController - 调出表情云商店页面
- (void)presentShopViewController;
  • fetchEmojisByType - 根据emojiCodesfetchType批量获取表情
- (void)fetchEmojisByType:(MMFetchType)fetchType codes:(NSArray *)emojiCodes completionHandler:(void (^)(NSArray *emojis))completionHandler;
  • MMFetchType - 表情类型
typedef enum
{
    MMFetchTypeSmall    = 1 << 0, //小表情
    MMFetchTypeBig      = 1 << 1, //大表情
    MMFetchTypeAll      = 1 << 2  //全部表情
} MMFetchType;
  • MMSDKMode - SDK模式
typedef enum
{
    MMSDKModeIM         = 1 << 0, //IM模式
    MMSDKModeComment    = 1 << 1, //评论模式
} MMSDKMode;
  • SDK 区域
typedef enum
{
    MMRegionChina   = 0,
    MMRegionOther   = 1,
} MMRegion;
  • SDK 语言
typedef enum
{
    MMLanguageChinese,
    MMLanguageEnglish,
} MMLanguage;
  • clearSession - 清空session,在App重新在前台打开时调用
- (void)clearSession;
  • clearCache - 清除缓存
- (void)clearCache;

BQMM/MMTheme.h

说明: 表情MM iOS SDK外观定制头文件

  • groupViewBgColor - 表情mm键盘背景色

    @property (nonatomic, strong) UIColor  *groupViewBgColor;
    
  • inputToolViewBgColor - 表情mm键盘表情包背景色

    @property (nonatomic, strong) UIColor  *inputToolViewBgColor;
    
  • packageBgColor - 表情mm键盘表情包背景色

    @property (nonatomic, strong) UIColor  *packageBgColor;
    
  • packageSelectedBgColor - 表情mm键盘表情包选中状态背景色

    @property (nonatomic, strong) UIColor  *packageSelectedBgColor;
    
  • sendBtnBgColor - 表情mm键盘底部发送按钮的背景色

    @property (nonatomic, strong) UIColor  *sendBtnBgColor;
    
  • sendBtnTitleColor - 表情mm键盘底部发送按钮的文字的颜色

    @property (nonatomic, strong) UIColor  *sendBtnTitleColor;
    
  • navigationBarColor - 表情商店顶部导航条颜色

    @property (nonatomic, strong) UIColor  *navigationBarColor;
    
  • navigationBarTintColor - 表情商店顶部导航条文字颜色

    @property (nonatomic, strong) UIColor  *navigationBarTintColor;
    
  • navigationTitleFont - 表情商店顶部导航条文字字体

    @property (nonatomic, strong) UIFont   *navigationTitleFont;
    
  • separateColor - 分隔线的颜色

    @property (nonatomic, strong) UIColor  *separateColor;
    
  • shopCategoryFont - 在商店界面,表情分类名文字字体

    @property (nonatomic, strong) UIFont   *shopCategoryFont;
    
  • shopCategoryColor - 在商店界面,表情分类名文字颜色

    @property (nonatomic, strong) UIColor  *shopCategoryColor;
    
  • shopPackageTitleFont - 在商店界面,表情包标题文字字体

    @property (nonatomic, strong) UIFont   *shopPackageTitleFont;
    
  • shopPackageTitleColor - 在商店界面,表情包标题文字颜色

    @property (nonatomic, strong) UIColor  *shopPackageTitleColor;
    
  • shopPackageSubTitleFont - 在商店界面,表情包子标题文字字体

    @property (nonatomic, strong) UIFont   *shopPackageSubTitleFont;
    
  • shopPackageSubTitleColor - 在商店界面,表情包子标题文字颜色

    @property (nonatomic, strong) UIColor  *shopPackageSubTitleColor;
    
  • removeBtnBgColor - 在已下载表情界面,移除按钮背景色

    @property (nonatomic, strong) UIColor  *removeBtnBgColor;
    
  • removeBtnTitleFont - 在已下载表情界面,移除按钮字体

    @property (nonatomic, strong) UIFont  *removeBtnTitleFont;
    
  • removeBtnTitleColor - 在已下载表情界面,移除按钮字颜色

    @property (nonatomic, strong) UIColor  *removeBtnTitleColor;
    
  • removeBtnBorderColor - 在已下载表情界面,移除按钮边框颜色

    @property (nonatomic, strong) UIColor  *removeBtnBorderColor;
    
  • detailPackageTitleFont - 表情包详情页标题文字字体

    @property (nonatomic, strong) UIFont   *detailPackageTitleFont;
    
  • 禁止下载label的背景色

    @property (nonatomic, strong, nullable) UIColor  *detailPackageBannedBgColor;
    
  • 禁止下载label的字体

    @property (nonatomic, strong, nullable) UIFont   *detailPackageBannedFont;
    
  • 禁止下载label的字体颜色

    @property (nonatomic, strong, nullable) UIColor  *detailPackageBannedColor;
    
  • detailPackageTitleColor - 表情包详情页标题文字颜色

    @property (nonatomic, strong) UIColor  *detailPackageTitleColor;
    
  • detailPackageDescFont - 表情包详情页描述文字字体

    @property (nonatomic, strong) UIFont   *detailPackageDescFont;
    
  • detailPackageDescColor - 表情包详情页描述文字颜色

    @property (nonatomic, strong) UIColor  *detailPackageDescColor;
    
  • detailPackagePreviewFont - 表情包详情页"长按表情可预览"文字字体

    @property (nonatomic, strong) UIFont   *detailPackagePreviewFont;
    
  • detailPackagePreviewColor - 表情包详情页"长按表情可预览"文字颜色

    @property (nonatomic, strong) UIColor  *detailPackagePreviewColor;
    
  • downloadTitleFont - 表情包列表"下载"按钮文字字体

    @property (nonatomic, strong) UIFont   *downloadTitleFont;
    
  • downloadTitleColor - 表情包列表"下载"按钮文字颜色

    @property (nonatomic, strong) UIColor  *downloadTitleColor;
    
  • downloadedTitleColor - 表情包列表"已下载"按钮文字颜色

    @property (nonatomic, strong) UIColor  *downloadedTitleColor;
    
  • downloadedBgColor - 表情包列表"已下载"按钮背景色

    @property (nonatomic, strong) UIColor  *downloadedBgColor;
    
  • downloadedBorderColor - 表情包列表"已下载"按钮边框颜色背景色

    @property (nonatomic, strong) UIColor  *downloadedBorderColor;
    
  • downloadBorderColor - 表情包列表下载控件边框颜色

    @property (nonatomic, strong) UIColor  *downloadBorderColor;
    
  • downloadBgColor - 表情包列表下载控件背景色

    @property (nonatomic, strong) UIColor  *downloadBgColor;
    
  • downloadingColor - 表情包列表下载控件下载进度条下载中填充色

    @property (nonatomic, strong) UIColor  *downloadingColor;
    
  • downloadingTextColor - 表情包列表下载控件下载中文字颜色

    @property (nonatomic, strong) UIColor  *downloadingTextColor;
    
  • copyrightFont - 表情包详情页,底部版权文字字体

    @property (nonatomic, strong) UIFont   *copyrightFont;
    
  • copyrightColor - 表情包详情页,底部版权文字颜色

    @property (nonatomic, strong) UIColor  *copyrightColor;
    
  • promptLabelFont - 错误提示文字字体

    @property (nonatomic, strong) UIFont   *promptLabelFont;
    
  • promptLabelColor - 错误提示文字颜色

    @property (nonatomic, strong) UIColor  *promptLabelColor;
    
  • retryBtnFont - 键盘内错误提示重试按钮字体

    @property (nonatomic, strong) UIFont   *retryBtnFont;
    
  • retryBtnColor - 键盘内错误提示重试按钮文字颜色

    @property (nonatomic, strong) UIColor  *retryBtnColor;
    
  • retryBtnBgColor - 键盘内错误提示重试按钮背景色

    @property (nonatomic, strong) UIColor  *retryBtnBgColor;
    
  • retryBtnBorderColor - 键盘内错误提示重试按钮边框颜色

    @property (nonatomic, strong) UIColor  *retryBtnBorderColor;
    
  • shopBtnBgColor - 键盘商店按钮背景色

    @property (nonatomic, strong) UIColor  *shopBtnBgColor;
    
  • shopBtnIconColor - 键盘商店按钮图标颜色

    @property (nonatomic, strong) UIColor  *shopBtnIconColor;
    
  • remindLabelFont - 表情预览页面错误提示文字字体

    @property (nonatomic, strong) UIFont   *remindLabelFont;
    
  • remindLabelColor - 表情预览页面错误提示文字颜色

    @property (nonatomic, strong) UIColor  *remindLabelColor;
    
  • loadFailedLabelFont - 商店内错误页面提示文字字体

    @property (nonatomic, strong) UIFont   *loadFailedLabelFont;
    
  • loadFailedLabelColor - 商店内错误页面提示文字颜色

    @property (nonatomic, strong) UIColor  *loadFailedLabelColor;
    
  • reloadBtnFont - 商店内错误页面重试按钮字体

    @property (nonatomic, strong) UIFont   *reloadBtnFont;
    
  • reloadBtnColor - 商店内错误页面重试按钮文字颜色

    @property (nonatomic, strong) UIColor  *reloadBtnColor;
    
  • orderBtnColor - 我的表情页面排序按钮的颜色

    @property (nonatomic, strong, nullable) UIColor *orderBtnColor;
    
  • finishBtnColor - 我的表情页面完成状态按钮的颜色

    @property (nonatomic, strong, nullable) UIColor *finishBtnColor;
    
  • packageBannedBgColor - 表情包禁止下载的提示背景颜色

    @property (nonatomic, strong, nullable) UIColor *packageBannedBgColor;
    
  • packageBannedTextColor - 表情包禁止下载的提示文字颜色

    @property (nonatomic, strong, nullable) UIColor *packageBannedTextColor;
    
  • packageBannedTextFont - 表情包禁止下载的提示文字字体

    @property (nonatomic, strong, nullable) UIFont   *packageBannedTextFont;
    
  • keyboardHeight - 键盘高度

    @property (nonatomic, assign) CGFloat  keyboardHeight;
    

BQMM/MMEmoji.h

  • emojiId - 表情Id
@property (nonatomic, copy) NSString *emojiId;
  • 表情名称
@property (nonatomic, copy) NSString *emojiName;
  • emojiCode - 表情编码
@property (nonatomic, copy) NSString *emojiCode;
  • emojiImage - 表情图片
@property (nonatomic, strong) UIImage *emojiImage;
  • emojiData - 图片数据
@property (nonatomic, strong) NSData *emojiData;
  • packageId - 表情包Id
@property (nonatomic, copy) NSString *packageId;

BQMM/MMTextParser.h

说明:表情mm文本消息解析器。

  • parseMMText - 从text中解析所有MMEmoji,本地没有的emoji code会从服务器实时获取。completionHandler是表情消息解析完成后的回调,参数textImgArray类型可能是MMEmoji或字符串。
+ (void)parseMMText:(NSString *)text completionHandler:(void(^)(NSArray *textImgArray))completionHandler;
  • localParseMMText - 从text中解析本地已下载的Emoji
+ (void)localParseMMText:(NSString *)text completionHandler:(void(^)(NSArray *textImgArray))completionHandler;
  • findEmojicodesResultFromMMText - 从mmText中检查出符合emojiCode格式的result数组
+ (NSArray<NSTextCheckingResult *> *)findEmojicodesResultFromMMText:(NSString *)mmText;
  • emojiTypeWithEmojiCode - 根据emojiCode获取是大表情还是小表情
+ (EmojiType)emojiTypeWithEmojiCode:(NSString*)emojiCode;

BQMM/UITextView+BQMM.h

说明:对UITextView的扩充,用于输入、显示及解析表情消息。

  • characterMMText - UITextView的内容解析成的纯文字,例如:你好[厉害]。

    @property(nonatomic, assign, readonly, nonnull) NSString *characterMMText;
    
  • textImgArray - UITextView的内容解析出的MMEmoji对象 和 string的数组,例如:@[@"你好", <Emoji*>]

    @property(nonatomic, assign, readonly, nonnull) NSArray *textImgArray;
    
  • mmTextWithRange - 获取输入框中的某一段文字,返回表情消息

- (NSString *)mmTextWithRange:(NSRange)range;

BQMM_EXT/MMTextAttachment.h

说明:继承NSTextAttachment,用于MMEmoji的富文本显示

  • emoji - 表情对象
@property (nonatomic, strong) MMEmoji *emoji;
  • placeHolderImage - gif表情图片第一帧,大小为100px*100px,可用于编辑富文本消息时的gif表情显示。
- (UIImage *)placeHolderImage;

BQMM_EXT/MMTextParser.h

说明:实现textImageArrayextDatatext的互相转换,开源类。

  • extDataWithTextImageArray - 将textImageArray转换成extData
+ (NSArray*)extDataWithTextImageArray:(NSArray*)textImageArray;
  • extDataWithEmojiCode - 将单个emojiCode转换成extData
+ (NSArray*)extDataWithEmojiCode:(NSString*)emojiCode;
  • stringWithExtData - 将extData转换成text
+ (NSString*)stringWithExtData:(NSArray*)extData;
  • sizeForMMTextWithExtData - 计算展示图文混排所需size。
+ (CGSize)sizeForMMTextWithExtData:(NSArray*)extData
                              font:(UIFont *)font
                  maximumTextWidth:(CGFloat)maximumTextWidth;
  • sizeForTextWithText - 计算展示纯文字所需size。
+ (CGSize)sizeForTextWithText:(NSString *)text
                         font:(UIFont *)font
             maximumTextWidth:(CGFloat)maximumTextWidth;

BQMM_EXT/MMTextView.h

说明:用于显示富文本消息的控件,开源类。

  • mmFont - 设置消息字体
@property (nonatomic,strong) UIFont *mmFont;
  • mmTextColor - 设置消息字体颜色
@property (nonatomic,strong) UIColor *mmTextColor;
  • setMmTextData - 设定视图文本,需要显示表情的地方如果本地有就显示,没有下载后显示。参数extData是一个二维数组,格式为@[@[@"emojiCode", @2],@[@"emojiCode", @1], @[@"text", @0]]
- (void)setMmTextData:(NSArray *)extData;
  • setMmTextData - 设定视图文本,需要显示表情的地方如果本地有就显示,没有下载后显示。参数extData是一个二维数组,格式为@[@[@"emojiCode", @2], @[@"emojiCode", @1], @[@"text", @0]]completionHandler是完成显示表情后的回调
- (void)setMmTextData:(NSArray*)extData
    completionHandler:(void(^)(void))completionHandler;
  • setURLAttributes - 将url和电话范围的内容设置成链接 ```objectivec
  • (void)setURLAttributes; ```

results matching ""

    No results matching ""