0

I used subtitle style as my Cell style in UITableView, but I need my detailTextLabel to display the detail on the right side of the cell. By default the subtitle appears on the left. How can I do it?

4

2 回答 2

3

查看 UITableViewCellStyleValue1 或 UITableViewCellStyleValue2。

http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html

于 2013-07-24T15:00:48.197 回答
0

为了稍微扩展 Paul 的答案,当您在 cellForRowAtIndexPath 中初始化表格视图单元格时,您需要执行类似的操作。

cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"Cell"];
于 2013-07-24T15:18:04.787 回答