- (void)viewDidLoad {
[super viewDidLoad];
//创建一个字符串 内容为 my name is qq
NSString * str = @"my name is qq ";
// uppercaseString 转大写的方法
NSString * daxie = [str uppercaseString];
//length 为字符长度
NSUInteger lenthree = [daxie length];
//字符串大写
NSLog(@"daxie %@",daxie);
//字符串长度
NSLog(@"lenthree = %ld",le![屏幕快照 2018-03-29 10.56.20.png]
UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(200, 100, 200, 40)];
label.text = daxie;
label.textColor = [UIColor redColor];
[self.view addSubview:label];
}
屏幕快照 2018-03-29 10.56.20.png
网友评论