UILabel *label = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont boldSystemFontOfSize:20.0];
label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
label.textAlignment = UITextAlignmentCenter;
label.textColor = [UIColor yellowColor]; // change this color
self.navigationItem.titleView = label;
label.text = NSLocalizedString(@"PageThreeTitle", @"");
[label sizeToFit];navigation自定义title
最新推荐文章于 2024-10-23 16:25:02 发布
本文介绍如何使用UILabel并自定义其样式,包括背景颜色、字体大小、阴影颜色、文本对齐方式及文本颜色等属性设置。
3434

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



