cri*_*ald 3 cocoa objective-c ios uistoryboardsegue ekeventstore
当我在完成块中调用performSegueWithIdentifier时,如果我没有将调用包装在dispatch_async中,则实际发生segue需要10秒钟.但是,我可以做其他事情而不将它们包装在同一个dispatch_async中,例如进行核心数据工作,或者记录"事物"......
任何关于这如何工作的原因以及为什么......我迷失了.如果这不是问这样的事的正确的地方,我道歉.
EKEventStore *store = [[EKEventStore alloc] init];
[store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[self performSegueWithIdentifier:self.phaseSegue sender:self];
});
}];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1867 次 |
| 最近记录: |