| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // WBFeedHelper.h
- // YYKitExample
- //
- // Created by ibireme on 15/9/5.
- // Copyright (c) 2015 ibireme. All rights reserved.
- //
- #import "YYKit.h"
- #import "WBModel.h"
- /**
- 很多都写死单例了,毕竟只是 Demo。。
- */
- @interface WBStatusHelper : NSObject
- /// 微博图片资源 bundle
- + (NSBundle *)bundle;
- /// 微博表情资源 bundle
- + (NSBundle *)emoticonBundle;
- /// 微博表情 Array<WBEmotionGroup> (实际应该做成动态更新的)
- + (NSArray<WBEmoticonGroup *> *)emoticonGroups;
- /// 微博图片 cache
- + (YYMemoryCache *)imageCache;
- /// 从微博 bundle 里获取图片 (有缓存)
- + (UIImage *)imageNamed:(NSString *)name;
- /// 从path创建图片 (有缓存)
- + (UIImage *)imageWithPath:(NSString *)path;
- /// 圆角头像的 manager
- + (YYWebImageManager *)avatarImageManager;
- /// 将 date 格式化成微博的友好显示
- + (NSString *)stringWithTimelineDate:(NSDate *)date;
- /// 将微博API提供的图片URL转换成可用的实际URL
- + (NSURL *)defaultURLForImageURL:(id)imageURL;
- /// 缩短数量描述,例如 51234 -> 5万
- + (NSString *)shortedNumberDesc:(NSUInteger)number;
- /// At正则 例如 @王思聪
- + (NSRegularExpression *)regexAt;
- /// 话题正则 例如 #暖暖环游世界#
- + (NSRegularExpression *)regexTopic;
- /// 表情正则 例如 [偷笑]
- + (NSRegularExpression *)regexEmoticon;
- /// 表情字典 key:[偷笑] value:ImagePath
- + (NSDictionary *)emoticonDic;
- @end
|