- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
FirstViewController *mainViewController = [[FirstViewController alloc] init];
SecondViewController *searchViewController = [[SecondViewController alloc] init];
mainViewController.title = @"首页";
searchViewController.title = @"搜索";
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:mainViewController];
UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:searchViewController];
[mainViewController release];
[searchViewController release];
NSMutableArray *controllers = [[NSMutableArray alloc] init];
[controllers addObject:nav];
[controllers addObject:nav1];
[nav release];
[nav1 release];
tabBarController.viewControllers = controllers;
tabBarController.selectedIndex = 0;
[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
[controllers release];
return YES;
}
分享到:
相关推荐
Qt - 导航栏的实现 只是当初练手的一些草稿类的东西,具体请参考博文 http://blog.csdn.net/lys211/article/details/43743187
js左侧导航栏A标签锚点跳转,流动效果。非常值得学习。
android导航栏的实现,https://blog.csdn.net/chensenli/article/details/83795411等三篇博客配备的代码
qt实现的导航栏demo,带切换特效,选中换色,选中条样式,渐变色,接口丰富,移植性和自定义性很强,QT4.8+VS2010编译通过。
1.使用RelativeLayout+TextView底部导航栏样式。 2.右上角带有消息提示个数。 3.使用Fragment实现导航效果。 相应的博客地址为:https://blog.csdn.net/lpCrazyBoy/article/details/80886487
标签栏+导航栏的交互使用
HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 HTML+CSS 完成伸缩式导航栏 ...
主要为大家详细介绍了vue项目nav导航栏的实现方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
小米官网 导航栏 HTML页面
Android三种实现底部导航栏样式,BottomTabbar样式,viewpager+fragement实现底部导航栏,RadioGroup实现导航栏其中一个可以直接跳转到其他页面
css+div+js实现简单导航栏开发;该页面简单明了,通俗易懂
包括实现文件、基本配置文件、和简单的图片,使用Qt模型视图委托方法进行实现树状导航栏,重要地方都已经加了注释,可以看看我的博客里面介绍了实现
记录原生html+js实现左侧导航栏右侧内容页的实现
用bootstrap4实现侧边导航栏并且带隐藏按钮。效果就是,点击按钮侧边导航栏出现,再点击消失。不用bootstrap也可以实现
导航栏效果,实现简单的导航栏效果切换,带有动画特效
jquery 悬浮 导航栏
通过ActivityGroup的方式实现Android底部导航栏。布局文件可根据activity所需编写
导航栏效果 html导航栏效果 html导航栏导航栏效果 html导航栏效果 html导航栏
Android自定义View——实现字母导航栏