UINavigationController、UITabBarController

UINavigationController(导航栏控制器)

@interface UINavigationController : UIViewController

//navigationBar是UINavigationController的一个属性
@property(nonatomic,readonly) UINavigationBar *navigationBar;
//是否隐藏
@property(nonatomic,getter=isNavigationBarHidden) BOOL navigationBarHidden;

//进入下一个视图
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
//返回上一个视图
- (nullable UIViewController *)popViewControllerAnimated:(BOOL)animated;
//返回某个视图
- (nullable NSArray<__kindof UIViewController *> *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;
//返回根视图
- (nullable NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated;

UINavigationBar(导航栏)

@interface UINavigationBar : UIView

//状态栏底色
@property(nullable, nonatomic,copy)UIColor          *backgroundColor;
//状态栏风格
@property(nonatomic,assign) UIBarStyle barStyle;
/*************************************    
    UIBarStyleDefault          = 0,   默认
    UIBarStyleBlack            = 1,   黑色
**************************************/    
是否半透明
@property(nonatomic,assign,getter=isTranslucent) BOOL translucent
//标题颜色
@property(null_resettable, nonatomic,strong) UIColor *tintColor;
//状态栏颜色
@property(nullable, nonatomic,strong) UIColor *barTintColor 

UINavigationItem(导航项)

@interface UIViewController (UINavigationControllerItem)

//navigationItem是UIViewController的一个属性
@property(nonatomic,readonly,strong) UINavigationItem *navigationItem;
//(1)设置导航栏标题
@property (nullable, nonatomic, copy) NSString *title;

@interface UINavigationItem : NSObject

//设置标题
//(2)直接设置字符串标题
@property(nullable, nonatomic,copy)   NSString        *title;
//(3)设置view类标题
@property(nullable, nonatomic,strong) UIView          *titleView;
//设置提示
@property(nullable,nonatomic,copy)   NSString *prompt;
//设置下页返回按钮
@property(nullable,nonatomic,strong) UIBarButtonItem *backBarButtonItem;
//设置左导航按钮
@property(nullable, nonatomic,strong) UIBarButtonItem *leftBarButtonItem;
@property(nullable,nonatomic,copy) NSArray<UIBarButtonItem *> *leftBarButtonItems;
//设置又导航按钮
@property(nullable, nonatomic,strong) UIBarButtonItem *rightBarButtonItem;
@property(nullable,nonatomic,copy) NSArray<UIBarButtonItem *> *rightBarButtonItems;

//动画隐藏导航栏

@interface UINavigationController : UIViewController

- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值