您的位置:首页 > 移动开发 > IOS开发

IOS 自定义标题文字

2014-04-04 12:02 246 查看


self.navigationItem.leftBarButtonItem=[[[UIBarButtonItem
alloc] initWithTitle:@"返回"
style:UIBarButtonItemStylePlain
target:self
action:@selector(pushAction)]
autorelease];

UILabel *customLab = [[UILabel
alloc] initWithFrame:CGRectMake(0,
0, self.view.frame.origin.x/2,
30)];

[customLab setTextColor:[UIColor
whiteColor]];
[customLab
setText:@"标题"];
customLab.font = [UIFont
boldSystemFontOfSize:30];

self.navigationItem.titleView = customLab;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: