UITableViewCell设置文本 [英] UITableViewCell setting text

查看:111
本文介绍了UITableViewCell设置文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建示例hello world应用程序。代码如下。如何在c [cell setText:@Hello World]中删除

I am creating sample hello world application. The code is below. How can i removed the

警告;在以下代码中弃用。

warning at c[cell setText:@"Hello World"]; in the code below as it deprecated.

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

[cell setText:@"Hello World"];


推荐答案

设置单元格标签文本

cell.textLabel.text = @"Hello World";

和详细标签文本

cell.detailTextLabel.text = @"yourText";

这篇关于UITableViewCell设置文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆