Setting style of UITableViewCell when using iOS 6 UITableView dequeueReusableCellWithIdentifier:forIndexPath:

后端 未结 6 1811
庸人自扰
庸人自扰 2020-12-02 07:28

I\'m trying to work out how to set the UITableViewCellStyle when using the new methods in iOS 6 for UITableView.

Previously, when creating

6条回答
  •  醉酒成梦
    2020-12-02 07:43

    dequeueReusableCellWithIdentifier isn't deprecated so you aren't required to use the new dequeueReusableCellWithIdentifier:forIndexPath:.

    Use the new way along with the appropriate register method (in viewDidLoad) if you are using a custom cell class but use the old way if you want to use one of the UITableViewCellStyle enums.

提交回复
热议问题