首先自定义view

+ (UIView *) changeViewTitleFontSize:(NSString *)strTitle;
{
    //自定义标题
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0 , 100, 44)];
    titleLabel.backgroundColor = [UIColor clearColor];
    titleLabel.font = [UIFont fontWithName: @"Helvetica" size: 14.0];
    titleLabel.textColor = [UIColor whiteColor];//设置文本颜色
    titleLabel.textAlignment = UITextAlignmentCenter;
    titleLabel.text = strTitle;
    return [titleLabel autorelease];
}

 

然后调用

self.navigationItem.titleView = [ABUtilchangeViewTitleFontSize:Localized(@"ModifyTheAlarmInformation")];

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-03-14
  • 2022-12-23
  • 2021-10-31
猜你喜欢
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2021-08-20
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案