- (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