开发者社区> 问答> 正文

请问如何把tableview中的字母转换为大写字母?

应用中有RSS,需要把标题中的字母转换为大写字母,能提供简单的方法么?
screenshot

展开
收起
爵霸 2016-05-27 10:58:28 2150 0
1 条回答
写回答
取消 提交回答
  • 这样就行了

    在cellForRow AtIndexPath

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    
    NSString *string1 = @"The quicK brOwn fox jumpeD";
    
    cell.textLabel.text = [string1 uppercaseString];
    
    ....
    2019-07-17 19:17:21
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载