我有一個非常輕的ViewController,它在viewDidLoad中什麼都沒做。我將這個視圖放在navigationController的頂部。執行此操作的方法是從塊內部調用的。在showView的調用之後,我添加了一個NSLog,並且該日誌在控制檯中的打印速度非常快,但視圖需要很多加載......我真的不明白可能發生了什麼......任何想法?pushViewController花費太多來顯示視圖
ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error) {
[self showView];
NSLog(@"EXECUTED");
});
- (void) showView{
TestViewController *test = [[TestViewController alloc]init];
[self.navigationController pushViewController:test animated:NO];
}
你可以發佈'TestViewController'嗎?很難看到這裏發生了什麼 – NSAddict