如何让我的UITableViewCell包含两个标签?

She*_*lam 2 iphone cocoa-touch objective-c interface-builder uitableview

我希望我的UITableViewCell看起来像下面的图像,似乎有两个标签.如果没有子类化UITableViewCell,这可能吗?

alt text http://img31.imageshack.us/img31/2764/photoobp.jpg

The*_*man 6

UITableVieWCell有不同的风格.看这里:

https://developer.apple.com/documentation/uikit/uitableviewcell/cellstyle

我想你想使用UITableViewCellStyleValue1.

您可以使用相关样式初始化UITableViewCell:

https://developer.apple.com/documentation/uikit/uitableviewcell/1623276-init

使用具有两个标签的样式时,可以分别使用textLabel和detailTextLabel属性来设置它们.