iphone - 将表格 View 中的文字变成大写?

标签 iphone ios xcode tableview

我正在使用RSS提要,需要将标题和副标题转换为大写字母,有没有简便的方法?

谢谢。

最佳答案

在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];

....

关于iphone - 将表格 View 中的文字变成大写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13551887/

相关文章:

ios - 在 tableview (iOS) 中显示来自 parse.com 的数组

Objective-C/Cocos2D 重复代码减少

javascript - React-native XCode 构建失败 -> "Expected a type"(RTCNetworking.m)

iphone - 使用 CALayer 创建 .PNG 的笔触/轮廓?

ios - Itunes Connect 与 Apple Developer

ios - UIViewController 不存在于 Instruments 堆射击分析的分配中

ios - 在 Swift 中使用动画将按钮从一个 UITableViewCell 移动到另一个

iphone - 当应用程序进入后台时如何继续运行 NSTimer

ios - 如何在 Swift 应用程序中全局设置自定义 header ?

ios - 如何阻止 UIView 中断 performSelector