【代码笔记】iOS-导航条的标题(label),ios-label

super viewDidLoad,// Do…,super viewDidLoad,sel…,- ( void )viewDidLoad{,super viewDidLoad,super viewDidLoad,// Do any additional setup after loadi…

【代码笔记】更动导航条题目标颜料为豆沙色,导航条题目

一,效果图。

金沙澳门官网7817网址 1

二,代码。

RootViewController.m

金沙澳门官网7817网址 2

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.

   [email protected]"I love you";

   //改变导航条标题的颜色为红色
   [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor redColor]}];
}

金沙澳门官网7817网址 3

 

一,效果图。 二,代码。 RootViewController.m – (void)viewDidLoad{
[super viewDidLoad]; // Do…

导航条的标题,导航条标题

 

效果图:

 

金沙澳门官网7817网址 4

 

代码:

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    [self.view addSubview:[self getTileLabel:@"你好!"]];
}
//导航条的标题
-(UILabel *)getTileLabel:(NSString *)title{

    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100 , 200, 44)];
    titleLabel.backgroundColor = [UIColor redColor];
    titleLabel.font=[UIFont boldSystemFontOfSize:18];
    titleLabel.textColor=[UIColor greenColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.text=title;
    return titleLabel;
}

 

金沙澳门官网7817网址, 效果图: 代码: –
(void)viewDidLoad { [super viewDidLoad]; // Do any additional setup
after loading the view, typically from a nib. [sel…

安装导航条标题标水彩,导航条题目颜色

效果图:

金沙澳门官网7817网址 5

代码:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.

   self.title=@"I love you";

   //改变导航条标题的颜色为红色
   [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor redColor]}];
}

 

效果图:
代码: – ( void )viewDidLoad{ [super viewDidLoad]; // Do any
additional setup after loading the view. self.ti…

【代码笔记】iOS-导航条的标题(label),ios-label

一,效果图。

金沙澳门官网7817网址 6

二,代码。

金沙澳门官网7817网址 7

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    [self.view addSubview:[self getTileLabel:@"你好!"]];

}
//导航条的标题
-(UILabel *)getTileLabel:(NSString *)title{

    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100 , 200, 44)];
    titleLabel.backgroundColor = [UIColor redColor];
    titleLabel.font=[UIFont boldSystemFontOfSize:18];
    titleLabel.textColor=[UIColor greenColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.text=title;
    return titleLabel;
}

金沙澳门官网7817网址 8

一,效果图。 二,代码。 – ( void )viewDidLoad { [super viewDidLoad];
// Do any additional setup after loadi…