代码块内容执行完毕再走下一步方法
作者:
ZebZheng | 来源:发表于
2018-06-08 16:24 被阅读0次 //更新token(同步更新)
CommonViewModel *vm=[CommonViewModel new];
[vm refreshLoginSuccess:^(BaseResponseData *result) {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_LOGINCHANGE object:@YES];
//这里改变RunLoop模式
CFRunLoopStop(CFRunLoopGetMain());
} failure:^(BaseResponseData *result) {
NSDictionary *userInfo=@{@"isPresentLoginVC":@(0)};
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_LOGINCHANGE object:@NO userInfo:userInfo];
//这里改变RunLoop模式
CFRunLoopStop(CFRunLoopGetMain());
}];
//这里恢复RunLoop
CFRunLoopRun();
本文标题:代码块内容执行完毕再走下一步方法
本文链接:https://www.haomeiwen.com/subject/bbuasftx.html
网友评论