转换的JSON的字典,然后在该通知将其作为用户信息:
NSDictionary *quickDict = [NSDictionary dictionaryWithObjectsAndKeys:object1, key1, nil];
NSNotification* notification = [NSNotification notificationWithName:kVideoDidFinishNotification object:self userInfo:quickDict];
[[NSNotificationCenter defaultCenter] postNotification:notification];
我不知道如何使videoPlayBackDidFinish是消息的接收器,而无需在委托做这样的事情:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlayBackDidFinish:) name:kVideoDidFinishNotification object:nil];
,然后在方法获取到字典:
-(void)videoPlayBackDidFinish: (NSNotification*)notification
{
NSDictionary *jsonInfo = [notification userInfo];
}
我不同意正在关闭的问题!我确切地知道他在问什么,以及如何回答他是否需要添加“我可以”而不是“我想要”? – badweasel 2013-03-16 09:48:32