How to Set UITableViewCellStyleSubtitle and dequeueReusableCell in Swift?

前端 未结 13 992
攒了一身酷
攒了一身酷 2020-12-01 05:03

I\'d like a UITableView with subtitle-style cells that use dequeueReusableCellWithIdentifier.

My original Objective-C code was

13条回答
  •  一整个雨季
    2020-12-01 05:44

    If you are not using your own Custom Cell. Simply register UITableViewCell through code. Then you can prefer code.

    Else select storyboard, select your TableViewCell -> Goto Attribute Inspector and choose the desired style as shown below.

提交回复
热议问题