// 設定最上方的標題列 UIColor* color = [[UIColor alloc]initWithRed:0.03 green:0.7 blue:0.31 alpha:1]; self.navigationController.navigationBar.tintColor = color; UILabel *titleText = [[UILabel alloc] initWithFrame: CGRectMake(0, 0, 200, 28)]; titleText.backgroundColor = [UIColor clearColor]; [titleText setFont:[UIFont boldSystemFontOfSize:28.0]]; [titleText setTextColor:[UIColor whiteColor]]; [titleText setText:@"我的標題"]; self.navigationItem.titleView = titleText;
沒有留言:
張貼留言