में पहले लॉगिन पेज से टैब बार न दिखाएं मैंने अपने ऐप में टैब बार नियंत्रक को लागू किया। लेकिन मेरा पहला पृष्ठ लॉगिन व्यू है। तो, मैं उस पर टैब बार नहीं दिखाना चाहता हूं। मैंने उस दृश्य पर टैब बार छुपाकर ऐसा किया।आईफोन एसडीके
लेकिन अब, जब मैंने पहला टैब चुना, तो यह हमेशा लॉगिन पृष्ठ के रूप में रूटव्यू नियंत्रक पर जाता है।
//for home tab..
UINavigationController *nav1 = [[UINavigationController alloc] init];
UIViewController *viewController1;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController1 = [[[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil] autorelease];
} else
{
viewController1 = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPad" bundle:nil] autorelease];
}
nav1.viewControllers = [NSArray arrayWithObjects:viewController1, nil];
//for account tab...
UINavigationController *nav2 = [[UINavigationController alloc] init];
UIViewController *viewController2;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController2 = [[[AccountView alloc] initWithNibName:@"AccountView_iPhone" bundle:nil] autorelease];
} else
{
viewController2 = [[[AccountView alloc] initWithNibName:@"AccountView_iPad" bundle:nil] autorelease];
}
nav2.viewControllers = [NSArray arrayWithObjects:viewController2, nil];
//for links tab...
UINavigationController *nav3 = [[UINavigationController alloc] init];
UIViewController *viewController3;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController3 = [[[LinksView alloc] initWithNibName:@"LinksView_iPhone" bundle:nil] autorelease];
} else
{
viewController3 = [[[LinksView alloc] initWithNibName:@"LinksView_iPad" bundle:nil] autorelease];
}
nav3.viewControllers = [NSArray arrayWithObjects:viewController3, nil];
//for about us tab...
UINavigationController *nav4 = [[UINavigationController alloc] init];
UIViewController *viewController4;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
viewController4 = [[[AboutUsView alloc] initWithNibName:@"AboutUsView_iPhone" bundle:nil] autorelease];
} else
{
viewController4 = [[[AboutUsView alloc] initWithNibName:@"AboutUsView_iPad" bundle:nil] autorelease];
}
nav4.viewControllers = [NSArray arrayWithObjects:viewController4, nil];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:nav1,nav2,nav3,nav4,nil];
self.tabBarController.tabBar.tintColor = [UIColor blackColor];
//self.tabBarController.tabBar.tintColor = [UIColor colorWithRed:237.0/255.0 green:208.0/255.0 blue:0.0/255.0 alpha:1.0];
self.window.rootViewController=self.tabBarController;
मैं इसे कैसे हल कर सकता हूं?
यदि मेरा उत्तर आपके लिए उपयोगी है तो मेरे उत्तर को स्वीकार करें और ऊपर उठाएं प्रिय :) –