TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2017 |
Maintained by fangjinfeng.
/**
根据 传入参数 设置 自定义 tabbarController
@param viewControllerArray viewController 字符串 数组
@param imageNameArray 普通 图片 数组
@param selectedImageNameArray 选中 图片 数组
@param titleArray tabbarItem 标题
@return tabbarController
*/
- (instancetype)initWithViewControllerArray:(NSArray<NSString *> *)viewControllerArray
imageNameArray:(NSArray<NSString *> *)imageNameArray
selectedImageNameArray:(NSArray<NSString *> *)selectedImageNameArray
titleArray:(NSArray<NSString *> *)titleArray;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
NSArray *viewControllerArray = [NSArray arrayWithObjects:
@"FJCourseViewController",
@"FJDiscoverViewController",
@"FJShopViewController",
@"FJProfileViewController",
nil];
NSArray *imageNameArray = [NSArray arrayWithObjects:
@"tab_jingxuan_hui.png",
@"tab_faxian_hui.png",
@"tab_dianpu_hui.png",
@"tab_wode_hui.png",
nil];
NSArray *selectedImageNameArray = [NSArray arrayWithObjects:
@"tab_jingxuan_xuanzhong.png",
@"tab_faxian_xuanzhong.png",
@"tab_dianpu_xuanzhong.png",
@"tab_wode_xuanzhong.png",
nil];
NSArray *titleArray = [NSArray arrayWithObjects:
@"精选",
@"发现",
@"店铺",
@"我的",
nil];
self.window.rootViewController = [[FJTabbarViewController alloc] initWithViewControllerArray:viewControllerArray imageNameArray:imageNameArray selectedImageNameArray:selectedImageNameArray titleArray:titleArray];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}