TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2017 |
Maintained by CoderZhuXH.
//1.初始化navigationBar + 设置标题
[self cus_initNavBarAndSetTitle:@"首页"];
//2.设置返回
[self cus_setNavBarBack];
//2.1设置返回并自定义返回事件
[self cus_setNavBarBackAndAction:@selector(backAction)];
//3.设置rightBarButtonItem
//-文字类型
[self cus_setNavBarRightButtonWithTitle:@"保存" action:@selector(saveAction)];
//-图片类型
//[selector cus_setNavBarRightButtonWithImageName:@"xh_navbar_back" action:@selector(saveAction)];
//1.初始化navigationBar + 设置标题
[self cus_initNavBarAndSetTitle:@"首页"];
//2.设置rightBarButtonItem
//-文字类型
[self cus_setNavBarRightButtonWithTitle:@"保存" action:@selector(saveAction)];
//-图片类型
//[selector cus_setNavBarRightButtonWithImageName:@"xh_navbar_back" action:@selector(saveAction)];
#pragma mark-使用系统navigationBar
/**
* 系统navbar-初始化+设置标题(此方法,包含初始化和设置标题 2步操作)
*
* @param title 标题
*/
-(void )sys_initNavBarAndSetTitle:(NSString *)title;
/**
* 系统navbar-设置rightButton with title
*
* @param name title
* @param selecter 事件
*
* @return Button
*/
-(UIButton *)sys_setNavBarRightButtonWithTitle:(NSString *)name action:(SEL)selecter;
/**
* 系统navbar-设置rightButton with imageName
*
* @param name 图片名
* @param selecter 事件
*
* @return Button
*/
-(UIButton *)sys_setNavBarRightButtonWithImageName:(NSString *)name action:(SEL)selecter;
#pragma mark-自定义navigationBar
/**
* 自定义navbar-初始化+设置标题
*
* @param title 标题
*
* @return 标题Label
*/
-(UILabel *)cus_initNavBarAndSetTitle:(NSString *)title;
/**
* 自定义navbar-设置返回按钮
*/
-(void)cus_setNavBarBack;
/**
* 自定义navbar-设置返回按钮+自定义事件
*/
-(void)cus_setNavBarBackAndAction:(SEL)selecter;
/**
* 自定义navbar-设置rightButton(文字类型)
*
* @param name title
* @param selecter 事件
*
* @return Button
*/
-(UIButton *)cus_setNavBarRightButtonWithTitle:(NSString *)name action:(SEL)selecter;
/**
* 自定义navbar-设置rightButton(图片类型)
*
* @param name 图片名
* @param selecter 事件
*
* @return Button
*/
-(UIButton *)cus_setNavBarRightButtonWithImageName:(NSString *)name action:(SEL)selecter;
XHNavBar 使用 MIT 许可证,详情见 LICENSE 文件