UITabBarController without a selected controller

In version 3.0 of the iPod application (and possibly in previous versions), when the iPod application starts after synchronization, UITabBarController appears without the tab selected ...

iPhone iPod boot screen

Is there a way to achieve the same behavior? or is it just Default.png displayed by the iPod application at startup?

+3
source share
4 answers

This will work when your tab bar is already loaded:
self.tabBarController.selectedViewController = nil;

In applicationDidFinishLaunching you will need to use something like this:
[tabBarController performSelector:@selector(setViewController:) withObject:nil afterDelay:0];

+1
source

, default.png, , , - , default.png , , iPod.

, UITabBarController selectedVC ...

0

, Default.png. docs ( ViewController), , , viewControllers , , iPod/music. , , .

0
source

It was possible to get this working by making the tab bar selection on my controller from the applicationDidBecomeActivefollowing code:

- (void)applicationDidBecomeActive:(UIApplication *)application {
    self.tabBarController.selectedViewController = splashScreenControllerThatHasNoTab;
}
-1
source

Source: https://habr.com/ru/post/1711365/


All Articles