當我從主要的viewController重定向到另一個的viewController 我得到這個爲什麼我得到延遲加載NSBundle MobileCoreServices.framework?
錯誤:
Lazy loading NSBundle MobileCoreServices.framework,
Loaded MobileCoreServices.framework,
System group container for systemgroup.com.apple.configurationprofiles path is /Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/ systemgroup.com.apple.configurationprofiles
我的代碼...
Appdelegate.m
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"Launched first time");
} else {
NSLog(@"Already launched");
[self getData];
}
viewDidLoad中的應用程序委託
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]) {
dispatch_async(dispatch_get_main_queue(), ^{
LoginPageViewController *lpvc = [self.storyboard instantiateViewControllerWithIdentifier:@"LPVC"];
[self.navigationController pushViewController:lpvc animated:NO];
});
} else {
// My code...
}
當我評論這行它的正常工作。[self.navigationController pushViewController:lpvc動畫:NO]; – iOS
爲什麼在viewDidLoad中創建主線程? ,我認爲viewDidLoad本身在主線程 –
我想重定向到登錄頁面,當它第一次啓動...你可以給我任何解決方案 – iOS