我必须显示注册视图控制器。目前这个屏幕是用UIWindow.rootViewController方法加载的,我不喜欢它作为解决方案。
在谷歌搜索后,我发现了this问题,这对我一点帮助都没有(问题仍然存在),所以我不得不问,还有没有其他solutions.My代码如下:
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
if(![Class isUserRegistered]){
[self performSegueWithIdentifier:@"" sender:self];
}
}
注册控制器在5-7秒后显示(iPhone 4,7.1.2)
一种可能的选择是使用自适应segue-s,但目前这是不可能的。
我注意到,当我从storyboar中删除所有插座时,视图的加载速度要快得多。
有什么想法吗?
发布于 2015-06-10 22:24:31
尝尝这个,
dispatch_async(dispatch_get_main_queue(), ^{
//this block of code is executed on main thread, all UI operations should be done on main thread
[self performSegueWithIdentifier:@"" sender:self];
});
https://stackoverflow.com/questions/30759094
复制相似问题