HJTabBarController - 簡單易上手的UITabBarController的封裝

jopen 8年前發布 | 13K 次閱讀 iOS開發 移動開發 HJTabBarController

HJTabBarController 【UITabBarController簡單封裝】

在MJ寫的TabBar的基礎上簡單封裝,簡單易上手的UITabBarController的封裝,支持自定義新浪微博中間的加號按鈕

導航

導入頭文件

#import "HJTabBarController.h"

兩個可供調用的方法:

/** 添加控制器,設置tabbar的屬性 */
- (void)addChildVc:(NSArray *)childVcs Titles:(NSArray *)titles TitleColor:(UIColor *)titleColor SelectedTitleColor:(UIColor *)selectedTitleColor ImageNames:(NSArray *)imageNames SelectedImageNames:(NSArray *)selectedImageNames HaveNavigationBar:(BOOL)haveNavigationBar;

/** 添加中間加號按鈕(可按需求定義成其他功能的按鈕)) */
- (void)tabBarPlusButtonImageName:(NSString *)imageName SelectedImageName:(NSString *)selectedImageName;

兩個可供設置的屬性

/** 設置點擊加號按鈕 present 出來的控制器*/
@property (nonatomic, strong) UIViewController *presentVc;
/** tabBar背景圖片,沒有則不用設置*/
@property (nonatomic, strong) UIImage *tabBarBackRoundImage;

具體效果大家可以下載Demo觀看,謝謝大家!

(更多iOS開發干貨,歡迎關注 微博@3W_獅兄



項目地址: https://github.com/CoderHJZhao/HJTabBarController

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!