代码块内容执行完毕再走下一步方法

 //更新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();
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容