Loading a Reusable UITableViewCell from a Nib

前端 未结 16 2223
遇见更好的自我
遇见更好的自我 2020-11-27 09:59

I am able to design custom UITableViewCells and load them just fine using the technique described in the thread found at http://forums.macrumors.com/showthread.php?t=545061.

16条回答
  •  一生所求
    2020-11-27 10:12

    Actually, since you are building the cell in Interface Builder, just set the reuse identifier there:

    Or if you are running Xcode 4, check the Attributes inspector tab:

    enter image description here

    (Edit: After your XIB is generated by XCode, it contains an empty UIView, but we need a UITableViewCell; so you have to manually remove the UIView and insert a Table View Cell. Of course, IB will not show any UITableViewCell parameters for a UIView.)

提交回复
热议问题