UIBarButtonItem *item = [UIBarButtonItemappearance];
//设置item普通状态
NSMutableDictionary *attrs = [NSMutableDictionarydictionary];
//设置字体及字体大小
例:attrs[NSFontAttributeName] = [UIFontsystemFontOfSize:17];
//设置字体颜色
例:attrs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0];
//设置全局item的属性
例:[itemsetTitleTextAttributes:attrsforState:UIControlStateNormal];
//设置item不可用状态
NSMutableDictionary *disabledAttrs = [NSMutableDictionarydictionary];
//设置字体及字体大小
例:disabledAttrs[NSFontAttributeName] = [UIFontsystemFontOfSize:17];
//设置字体颜色
例:disabledAttrs[NSForegroundColorAttributeName] =[UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0];
//设置全局item的属性
例:[itemsetTitleTextAttributes:disabledAttrsforState:UIControlStateDisabled];
//隐藏返回按钮的返回两个字
例:[item setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];
//设置整个项目的UINavigationBar状态
UINavigationBar * bar = [UINavigationBarappearance];
//设置导航栏title的字体颜色、字体、字体大小
@property(nonatomic,copy)NSDictionary *titleTextAttributes;
例:[barsetTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColorblackColor],NSFontAttributeName:[UIFontsystemFontOfSize:17.0]}];
//设置导航栏系统按钮的颜色(默认是蓝色)
@property(nonatomic,retain)UIColor *tintColor
例:bar.tintColor = [UIColorblackColor];
//设置导航栏背景颜色
@property(nonatomic,retain)UIColor *barTintColor
例:bar.barTintColor = [UIColorblueColor];
//设置导航栏返回箭头图片
// 必须要两个都设置,并且图片要设置成不渲染
@property(nonatomic,retain)UIImage *backIndicatorImage;
@property(nonatomic,retain)UIImage *backIndicatorTransitionMaskImage;
例:bar.backIndicatorTransitionMaskImage = [UIImageimageNamed:@"nav_back_B"];
例:bar.backIndicatorImage = [UIImageimageNamed:@"nav_back_B"];
//设置背景图片
// barMetrics需要设置成UIBarMetricsDefault
- (void)setBackgroundImage:(UIImage *)backgroundImage forBarMetrics:(UIBarMetrics)barMetrics
//设置背景阴影图片
@property(nonatomic,retain)UIImage *shadowImage
//设置title文字垂直偏移量
- (void)setTitleVerticalPositionAdjustment:(CGFloat)adjustment forBarMetrics:(UIBarMetrics)barMetrics