编辑
presentViewController不显示
本文访问次数:0

有时候调用presentViewController之后,视图并不会立刻出现,这是因为main runloop being asleep,解决办法如下

[self presentViewController:vc animated:YES completion:nil];
CFRunLoopWakeUp(CFRunLoopGetCurrent());
//Or you can enqueue an empty block to the main queue:
[self presentViewController:vc animated:YES completion:nil];
dispatch_async(dispatch_get_main_queue(), ^{});
没有任何评论