当我从主要的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