- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我仅在 iOS9 中收到以下错误。
这是我的代码:-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"login_dict"])
{
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"isLogout"] == nil || [[[NSUserDefaults standardUserDefaults] objectForKey:@"isLogout"] integerValue]== 0)
{
self.loginDict = [[BaseViewController sharedInstance] removeNullFromDictionary:[[NSUserDefaults standardUserDefaults] objectForKey:@"login_dict"]];
self.firstViewController = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
}
if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"isLogout"] integerValue]== 1)
{
self.firstViewController = [[WelcomeViewController alloc] initWithNibName:@"WelcomeViewController" bundle:nil];
}
NSLog(@"Userinfo = %@",self.loginDict);
}
else
{
self.firstViewController = [[WelcomeViewController alloc] initWithNibName:@"WelcomeViewController" bundle:nil];
}
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.navigationController = [[BufferedNavigationController alloc] initWithRootViewController:self.firstViewController];
//[window makeKeyAndVisible];
[self.window setRootViewController:self.navigationController];
}
注意:此代码在 Xcode 6.4 和 iOS8 中运行良好。
Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/UIApplication.m:3294
最佳答案
我不得不从应用程序 didFinishLaunchingWithOptions 中删除这一行:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
这为我解决了问题。
关于ios - -[UIApplication _runWithMainScene :transitionContext:completion:], 中的断言失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32711397/
我正在尝试在两个 uiviewcontroller 之间的转换期间创建自定义动画。当我试图弹出一个 View Controller 时,我在 [transitionContext containerV
这是我的实际错误: Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /Bu
我仅在 iOS9 中收到以下错误。 这是我的代码:- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOp
我遇到了一个问题: 当我尝试覆盖方法 startInteractiveTransition: 时,我尝试保存 transitionContext,并获取 FromVC 和 ToVC来自 transit
我有一个 UINavigationController 设置,我希望使用自定义动画来弹出/推送 View 。我之前使用过自定义转换没有问题,但在这种情况下,我实际上在我的“from”和“to”UIVi
我是一名优秀的程序员,十分优秀!