iOS 开发导航栏使用系统自定义属性基本4条

来源:互联网 发布:seo自学好学吗 编辑:程序博客网 时间:2024/06/08 00:08

1,返回箭头颜色:delegate

[[UINavigationBar appearance] setTintColor:[UIColorwhiteColor]];

2,标题颜色及设置

UILabel *titleLabel = [[UILabelalloc] initWithFrame:CGRectMake(0, 0, 200, 44)];

    titleLabel.textColor = [UIColorwhiteColor];

    titleLabel.textAlignment =NSTextAlignmentCenter;

    titleLabel.text =@"我的设备";

    self.navigationItem.titleView = titleLabel;

3,backGroundColor:delegate

[[UINavigationBar appearance] setBarTintColor:[UIColorcolorWithRed:66/255.0 green:66/255.0blue:66/255.0 alpha:1]];

4,右边的item就自己设置图片呗
0 0
原创粉丝点击