cómo presentarse segunda o tercera barra de pestañas cuando se lanza aplicación para el iPhone
-
10-10-2019 - |
Pregunta
hi He creado una aplicación para iPhone. Estoy usando 5 elementos de la barra de pestañas. Por defecto, cuando la aplicación se puso en marcha, se muestra la primera barra de pestañas. Lo que quiero hacer es mostrar tercera barra de pestañas cuando se inicia la aplicación. ¿Cómo puedo hacer eso?
Saludos cordiales, Abdul Qavi
Solución
In the application didFinishLaunchingWithOptions
method of your AppDelegate, some time before the end, add the indicated line.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
. . .
// Add this line
tabcontroller.selectedIndex = 2;
[window addSubview:tabcontroller.view];
[window makeKeyAndVisible];
return YES;
}
Note that the 2 is the tab to switch to, starting with 0 for the first tab.
Otros consejos
just set the selectedItem property of the tabbar to the number you want to show up.
hAPPY iCODING....
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow