iOS 在UILabel显示不同的字体和颜色&&

2016-04-18  本文已影响213人  邹邹_ZZ

iOS 在UILabel显示不同的字体和颜色

截取字符串

Output : 2011-07-05 11:49:08.170 Q[4005:207] a:1.2.30
2011-07-05 11:49:08.172 Q[4005:207] b:30

-(void)viewDidLoad
{
NSString *a = @"i like long dress";
NSString *b = [a substringToIndex:4];
NSLog(@"\n b: %@",b);
}

2011-07-11 18:12:40.119 Q[6321:207]
b: i li

-(void)viewDidLoad
{
NSString *a = @"i like long dress";
NSString *b = [a substringFromIndex:4];
NSLog(@"\n b: %@",b);
}

2011-07-11 18:15:08.125 Q[6366:207]
b: ke long dress

上一篇 下一篇

猜你喜欢

热点阅读