##這種方式可以讓你快速生成一個UITabBarController與UINavigationController的混合開發(fā)形式捞稿!
更加簡潔頁請看:http://www.reibang.com/p/d2730568230b
######首先我們在入口類指定TabBarController
????#import"AppDelegate.h"
????#import"QWTabBarController.h"
????@interfaceAppDelegate()
????@end
????@implementationAppDelegate
????- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
????self.window= [[UIWindowalloc]initWithFrame:[UIScreenmainScreen].bounds];
????QWTabBarController*tabBar = [[QWTabBarControlleralloc]init];
????self.window.rootViewController= tabBar;
????[self.windowmakeKeyAndVisible];
????returnYES;
????}
######2.創(chuàng)建一個UINavigationController
.h
#import@interface QWNavitionController: UINavigationController
@end
.m
#import "QWNavitionController.h"
@interface QWNavitionController ()
@end
@implementation QWNavitionController
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationBar.barTintColor = MAIN_COLOR;
[self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont systemFontOfSize:20.0]}];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
######3.創(chuàng)建對應(yīng)的UITabBarController
#define MAIN_COLOR RGB(233.0,82.0,82.0) 宏定義的顏色