首页 > 其他分享 >iOS UITabBarController 典型应用

iOS UITabBarController 典型应用

时间:2023-05-22 19:04:13浏览次数:36  
标签:典型 alloc title self iOS encodeNaviVCtrl UINavigationController UITabBarControlle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
self.tabBarController = [[UITabBarController alloc] init];

DecodeGifViewController *decodeVCtrl = [[ DecodeGifViewController alloc ] initWithStyle:UITableViewStyleGrouped ];
UINavigationController *decodeNaviVCtrl = [[ UINavigationController alloc ] initWithRootViewController:decodeVCtrl ];
decodeVCtrl.title = decodeNaviVCtrl.title = @"Decode";
decodeNaviVCtrl.tabBarItem.image = [ UIImage imageNamed:@"decode.png" ];
decodeNaviVCtrl.navigationBar.barStyle = UIBarStyleBlack;

EncodeViewController *encodeVCtrl = [[ EncodeViewController alloc ] initWithStyle:UITableViewStylePlain ];
UINavigationController *encodeNaviVCtrl = [[ UINavigationController alloc ] initWithRootViewController:encodeVCtrl ];
encodeVCtrl.title = encodeNaviVCtrl.title = @"Encode";
encodeNaviVCtrl.tabBarItem.image = [ UIImage imageNamed:@"encode.png" ];
encodeNaviVCtrl.navigationBar.barStyle = UIBarStyleBlack;

self.tabBarController.viewControllers = [NSArray arrayWithObjects:decodeNaviVCtrl, encodeNaviVCtrl, nil];

self.window.rootViewController = self.tabBarController;
    [self.window makeKeyAndVisible];
    return YES;
}

标签:典型,alloc,title,self,iOS,encodeNaviVCtrl,UINavigationController,UITabBarControlle
From: https://blog.51cto.com/u_16124099/6326579

相关文章

  • iOS Apple Development Document 详解
    iOS官方开发文档https://developer.apple.com/library/prerelease/ios/navigation/点击打开链接再次标记一下。......
  • 基于alios(centos 7.2) 安装 docker
    参考文档:https://help.aliyun.com/document_detail/51853.html?spm=a2c4g.264695.0.0.55c91e18zfwqrz#section-gtl-cjs-ls2https://developer.aliyun.com/article/1148896https://blog.csdn.net/qq_32828933/article/details/88656414https://github.com/huataihuang/cloud-a......
  • iOS Label 作为分割线时 上下左右切边
    -(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheview,typicallyfromanib.//CGFloatborderWidth=20.0;//UILabel*label=[[UILabelalloc]initWithFrame:CGRectMake(100,400,100,100)];......
  • iOS 免费后台系统 Bmob平台
    Bmob平台为您的移动应用提供了一个完整的后端解决方案,我们提供轻量级的SDK开发包,让开发者以最小的配置和最简单的方式使用Bmob平台提供的服务,进而完全消除开发者编写服务器代码以及维护服务器的操作。使用CocoaPods安装BmobSDK如何使用CocoaPods安装BmobSDK可查看我们提供的文档:......
  • iOS 常用UI 部分常用 方法
    1、设置NavigationBar主题UINavigationBar*navigatonBar=[UINavigationBarappearance];//获取到navigationBar[navigatonBarsetBackgroundImage:<#(nullableUIImage*)#>forBarMetrics:<#(UIBarMetrics)#>]; 设置标题颜色NSMutableDictionary*attributes=[NSMut......
  • 【iOS开发】UIWebView调用JS点击事件(stringByEvaluatingJavaScriptFromString)
    一、场景描述产品需求是移动端app要调用h5页面,然后监听h5代码中的某个方法,最终执行h5中的具体代码。二、具体代码.m文件@interfaceViewController()<UIWebViewDelegate>@property(nonatomic,strong)UIWebView*webView;@end@implementationViewController-(void)viewDid......
  • 【Swift开发】混合开发-React Native集成到原生iOS项目
    一、场景描述针对目前项目需求,部分功能需要动态热部署,因此考虑使用ReactNative。下面有个Demo介绍原生iOS项目是如何与ReactNative集成的。先贴下ReactNative中文网是官方教程:ReactNative嵌入到现有原生应用。对老项目来说,官方推荐使用第三方包管理器CoCoaPods来自动集成,但是考......
  • 【iOS开发】This application's application-identifier entitlement does not match
    Xcode编译报错:Thisapplication’sapplication-identifierentitlementdoesnotmatchthatoftheinstalledapplication.Thesevaluesmustmatchforanupgradetobeallowed.原因:两次编译的用的证书不一致。解决:把之前装的app卸载,重新安装下。......
  • 【iOS开发】后台定位&&socket长链接
    参考:iOS9后台定位无限后台定位注意:这个上架appstore可能会被拒绝,如果你的应用不是和地图类相关的话。目前没想到好的解决方案,有的话请发邮件告诉博主一下,谢谢!!!......
  • 【iOS开发】iOS系统更新到10.3以上无法下载企业应用
    问题描述:iOS系统10.3以上系统,通过公司app发布平台下载企业应用,在Safari中点击下载链接,服务器报错无法链接到iapp.ihefe.com。如图:解决办法:打开通用-》关于本机-》证书信任设置,然后把iapp.ihefe.com给打开,点击继续就行了。如图:......