当我在完成块中调用 performSegueWithIdentifier 时,如果我不将调用包装在 dispatch_async 中,则实际上需要 10 秒才能真正发生 segue。但是,我可以在不将它们包装在同一个 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];
});
}];