UITableViewCell内的UILabel不显示带有“å”

时间:2016-11-17 12:36:22

标签: ios encoding uilabel special-characters

我的应用程序从服务器接收json并在Core Data中存储一些字符串。然后这个字符串显示在uitableviewcell里面的uilabel中。文本包含特殊字符,例如“å。我的问题是文本没有显示在单元格中。但是,它在uilabel中很好地显示在简单的UIView中。此外,xcode中的屏幕截图显示UITablViewCell中的uilabel包含文字,但在视觉上它是不可见的。

使用NSJSONSerialization类解析Json。

它如何查找用户:http://prntscr.com/d8f12e 它在屏幕截图中的外观如何:http://prntscr.com/d8f26w

1 个答案:

答案 0 :(得分:1)

我有办法 当你在tableView方法中访问字符串cellForRowAtIndex然后以这种方式使用:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

     UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
     if (indexPath.row == 0) {
          // do specific action on first cell 
     }
}

从这种类型的解析中,您将获得所需的输出。