NSString *strDay = [dic objectForKey:@"day"];
NSString *uppercaseString = [strDay uppercaseString];
cell.dayLabel.text = uppercaseString;
这是正确的方法吗?但我只得到大写字母。我希望“星期天”像“太阳”一样显示在视图中。
NSString *strDay = [dic objectForKey:@"day"];
NSString *uppercaseString = [strDay uppercaseString];
cell.dayLabel.text = uppercaseString;
这是正确的方法吗?但我只得到大写字母。我希望“星期天”像“太阳”一样显示在视图中。
就这个怎么样
NSString *uppercaseString = [strDay uppercaseString];
cell.dayLabel.text = [uppercaseString substringToIndex:3];
假设它有一个有效的一天
NSString *strDay = [dic objectForKey:@"day"];
NSString* split = [strDay substringToIndex:3];
split=[split uppercaseString];
NSLOG (@"%@",split);
干杯!
NSString *strDay = [dic objectForKey:@"day"];
cell.dayLabel.text = [strDay.uppercaseString substringToIndex:3]
NSString *strDay = @"sunday";
NSString *newStr = [strDay substringToIndex:3];
NSString *uppercaseString = [newStr uppercaseString];