是否可以在
中的AppDelegate中显示最后一个显示的视图控制器- (void)applicationDidBecomeActive:(UIApplication *)application;
感谢您回答=)
答案 0 :(得分:2)
如果您的rootViewController
是UINavigationController
,则可以获得topViewController
UINavigationController *nav =
(UINavigationController *)[[self window] rootViewController];
[nav.topViewController view].backgroundColor = [UIColor redColor];
如果UITabBarController
为rootViewController
UITabBarController *nav =
(UITabBarController *)[[self window] rootViewController];
[nav.selectedViewController view].backgroundColor = [UIColor redColor];