ios - 注册或登录 iOS7 后如何显示标签栏
<p><p>基本上我有一个基于标签的应用程序,它首先需要从登录页面登录/注册,然后才能看到标签栏,我已经在这个页面上运行了大约 3 个小时,但还没有解决方案!</p>
<p>所以它更像:
LandingCtrl(tabBarNotvisible)-> LoginCtrl(tabBarNotvisible)-> profile(tabBarvisible)</p>
<p>这是我尝试过的:</p>
<p>appdelegate.m</p>
<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [ initWithFrame:[ bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = ;
// Initialize tab controllers.with each tab has its own navigation controller
ProfileViewController *profileViewController =[init];
UINavigationController *nav1 = [initWithRootViewController:profileViewController];
;
DiscoverViewController *discoverViewController=[init];
UINavigationController *nav2 = [initWithRootViewController:discoverViewController];
;
RecievedViewController *recievedViewController = [init];
UINavigationController *nav3 = [initWithRootViewController:recievedViewController];
;
// initialize tabbarcontroller and set your viewcontrollers.
self.tabBarController = [init];
self.tabBarController.viewControllers=;
// Inititalize Navigationcontroller and set root as tabbar.
self.navBarController = [initWithRootViewController:self.tabBarController];
LandingViewController *landingviewcontroller = [ init];
UINavigationController *nVC = [ initWithRootViewController:landingviewcontroller];
nVC = [initWithRootViewController:landingviewcontroller];
nVC.navigationBar.barTintColor = ;
[ setBackButtonTitlePositionAdjustment:UIOffsetMake(-100.f, 0) forBarMetrics:UIBarMetricsDefault];
nVC.navigationBar.tintColor = ;
nVC.navigationBar.translucent = NO;
;
;
//;
;
return YES;
}
</code></pre>
<p>仍然无法让该死的东西工作,我非常感谢您的帮助,谢谢!!!!!!</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我正在关注以下代码。这对我有用,检查一次。您应该先创建登录页面,然后在登录页面上创建此逻辑。 </p>
<pre><code>NewHomeView *home=[initWithNibName:@"NewHomeView_iPad" bundle:nil];
UIImage *imag=;
initWithTitle:@"Home" image:imag tag:100]];
BiographyView *biography= [ initWithNibName:@"BiographyView_iPad" bundle:nil];
UIImage *imag1=;
initWithTitle:@"Biography" image:imag1 tag:101]];
GalleryView *gallery = [ initWithNibName:@"GalleryView_iPad" bundle:nil];
UIImage *imag2=;
initWithTitle:@"Gallery" image:imag2 tag:102]];
VideosView *video = [ initWithNibName:@"VideosView_iPad" bundle:nil];
UIImage *imag3=;
initWithTitle:@"Videos" image:imag3 tag:103]];
MoviesView *movies = [ initWithNibName:@"MoviesView_iPad" bundle:nil];
UIImage *imag4=;
initWithTitle:@"Movies" image:imag4 tag:104]];
NewsView *news = [ initWithNibName:@"NewsView_iPad" bundle:nil];
UIImage *imag5=;
initWithTitle:@"News" image:imag5 tag:105]];
tabController = [ init];
];
;
</code></pre></p>
<p style="font-size: 20px;">关于ios - 注册或登录 iOS7 后如何显示标签栏,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/25255890/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/25255890/
</a>
</p>
页:
[1]