UILabel *myTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
[myTitle setTextColor:[UIColor whiteColor]];
[myTitle setText:self.title];
myTitle.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = myTitle;
[myTitle setTextColor:[UIColor whiteColor]];
[myTitle setText:self.title];
myTitle.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = myTitle;
本文介绍如何使用UILabel创建自定义样式的标题视图,并设置了文本颜色、字体大小等属性。
1万+

被折叠的 条评论
为什么被折叠?



