Re: UITableViewCells
Fritz Anderson <[email protected]> Sun, 20 Jun 2010 12:59:26 -0500
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 20 Jun 2010, at 8:23 AM, Rui Lopes wrote: > When i creat a custom cell in IB, when the app runs, it's shown outside de table (on the right side only). Can anyone help me with that? > TableView GroupedStyle. I'm not clear on what you mean by "outside the table." Is the table narrow, and the cell is drawn as though in the window's view hierarchy off to the side? Be aware of these things: - Ordinarily, a UITableViewCell should be the only thing in its XIB. Your cellForRowAtIndexPath: method will have to instantiate several cells, and you wouldn't want to load a NIB every time that also contained other things. (Worse things than a waste of resources would happen - you'd likely replace all the controller's view objects.) - You do not make a UITableViewCell a subview of anything else. At cellForRowAtIndexPath: time, the UITableView does the insertion. At XIB time, it's simply nonsensical. — F