1.手势识别
http://yulingtianxia.com/blog/2016/12/29/Multimedia-Edit-Module-Architecture-Design/
2.开屏广告
http://www.jianshu.com/p/d5e42fd92484
3.Xcode快捷键
http://www.jianshu.com/p/2b072b206c90
4.成长之路
http://www.jianshu.com/p/280058ab16f3
5.category
GetSenderProfile得到TIMUserProfile类型,通过category实现IMUserAble
/**
* 获取发送者资料(发送者为自己时可能为空)
*
* @return 发送者资料,nil 表示没有获取资料,目前只有字段:identifier、nickname、faceURL、customInfo
*/
-(TIMUserProfile *) GetSenderProfile;
- (void)onRecvGroup:(TIMMessage *)msg
{
id<IMUserAble> info = [msg GetSenderProfile];
if (!info)
{
info = [msg GetSenderGroupMemberProfile];
}
for(int index = ; index < [msg elemCount]; index++)
{
TIMElem *elem = [msg getElem:index];
if([elem isKindOfClass:[TIMTextElem class]])
{
//消息
TIMTextElem *textElem = (TIMTextElem *)elem;
NSString *msgText = textElem.text;
[self onRecvGroupSender:info textMsg:msgText];
}
else if([elem isKindOfClass:[TIMCustomElem class]])
{
// 自定义消息
[self onRecvGroupSender:info customMsg:(TIMCustomElem *)elem];
}
}
}
@implementation TIMUserProfile (IMUserAble) // 两个用户是否相同,可通过比较imUserId来判断
// 用户IMSDK的identigier
- (NSString *)imUserId
{
return self.identifier;
} // 用户昵称
- (NSString *)imUserName
{
return self.nickname.length > ? self.nickname : self.identifier;
} // 用户头像地址
- (NSString *)imUserIconUrl
{
return [NSString isEmpty:self.faceURL] ? nil : self.faceURL;
} - (BOOL)isEqual:(id)object
{
BOOL isEqual = [super isEqual:object];
if (!isEqual)
{
if ([object conformsToProtocol:@protocol(IMUserAble)])
{
id<IMUserAble> io = (id<IMUserAble>)object;
isEqual = [[self imUserId] isEqualToString:[io imUserId]];
}
}
return isEqual;
}