ios 7 customizing UITableViewCell's content view

前端 未结 5 623
春和景丽
春和景丽 2021-02-11 00:59

Using storyboard in ios7 the content view is explicitly viewed under the Table View Cell in the story board editor (opposed to previous version

5条回答
  •  野性不改
    2021-02-11 01:37

    I don't really know the answer, but I can suggest work around this issue:

    1) Copy existing cell from other tableview to the one you're working on.

    2) You will have contentView under your cell now. Design this cell by adding your views.

    3) Create a class for your cell, e.g NewCell, then manually create IBOutlet in this class:

    @property (nonatomic, strong) IBOutlet UILabel* mainLabel;

    4) Assign the cell class in storyboard to the class you just created. After this step, you can drag the outlet from storyboard to class.

    I'm not sure if this is a bug for XCode 5 or it is intended, and I'm looking for better solutions as well.

提交回复
热议问题