<span style="font-size:18px;">在 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]; </span>
摘自 計算機學習村落