在 iPhone 应用的导航栏添加自定义标题

来源:互联网 发布:当下最流行的网络歌曲 编辑:程序博客网 时间:2024/05/17 17:15
在 iPhone 应用的导航栏添加自定义标题 在开发中经常会用到导航器,在导航器中添加标题很简单,如下: self.title=@"Elimination 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;     [titleText release]; 

原创粉丝点击