《省钱达人》与《猎豆优选》UI相同版。域名tbk

MLExpressionManager.h 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // MLExpressionManager.h
  3. // Pods
  4. //
  5. // Created by molon on 15/6/18.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface MLExpression : NSObject
  10. @property (readonly, nonatomic, copy) NSString *regex;
  11. @property (readonly, nonatomic, copy) NSString *plistName;
  12. @property (readonly, nonatomic, copy) NSString *bundleName;
  13. + (instancetype)expressionWithRegex:(NSString*)regex plistName:(NSString*)plistName bundleName:(NSString*)bundleName;
  14. @end
  15. @interface MLExpressionManager : NSObject
  16. + (instancetype)sharedInstance;
  17. //获取对应的表情attrStr
  18. + (NSAttributedString*)expressionAttributedStringWithString:(id)string expression:(MLExpression*)expression;
  19. //给一个str数组,返回其对应的表情attrStr数组,顺序一致
  20. + (NSArray *)expressionAttributedStringsWithStrings:(NSArray*)strings expression:(MLExpression*)expression;
  21. //同上,但是以回调方式返回
  22. + (void)expressionAttributedStringsWithStrings:(NSArray*)strings expression:(MLExpression*)expression callback:(void(^)(NSArray *result))callback;
  23. @end