Loading a Reusable UITableViewCell from a Nib

前端 未结 16 2213
遇见更好的自我
遇见更好的自我 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:21

    Look at the answer I gave to this question:

    Is it possible to design NSCell subclasses in Interface Builder?

    It's not only possible to design a UITableViewCell in IB, it's desirable because otherwise all of the manual wiring and placement of multiple elements is very tedious. Performaance is fine as long as you are careful to make all elements opaque when possible. The reuseID is set in IB for the properties of the UITableViewCell, then you use the matching reuse ID in code when attempting to dequeue.

    I also heard from some of the presenters at WWDC last year that you shouldn't make table view cells in IB, but it's a load of bunk.

提交回复
热议问题