在开发中经常会用到导航器,在导航器中添加标题很简单,如下:
phase Day 1"; UILabel *titleText = [[UILabel alloc] initWithFrame: CGRectMake(0, 0, 200, 20)]; titleText.backgroundColor = [UIColor clearColor]; [titleText setFont:[UIFont systemFontOfSize:15.0]]; [titleText setText:@"Elimination phase Day 1"]; self.navigationItem.titleView=titleText;