I notice that InterfaceBuilder has UITableViewCell
in its library of objects I can drag onto a view. I wonder if it ever makes sense to use one outside of a UITableView
.
相关问题
- Image loads in simulator but not device?
- UIModalTransitionStyleFlipHorizontal flips Vertica
- Xcode4 templates now use underscore on iVars?
- How can i associate an IBAction event with an imag
- How to Implement Touch Up Inside in touchesBegan,
相关文章
- Xcode: Is there a way to change line spacing (UI L
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- How to get a CGImageRef from Context-Drawn Images?
- Why are my UIView layer properties not being set w
- create UIImageView
- Can I add a border to an SKSpriteNode, similar to
- textFieldDidBeginEditing: for more than one textfi
- UIView subclass draws background despite completel
I have tried this and yes it does not appear to work. Which is, of course, fair, given the purpose and use of cells.
A reason for wanting to do this, in my case I have the cell used in a table view, selecting a cell then pushes on another view, part of which is an exact repeat of the contents of the cell, shown at the top.
So it would be very convenient to simply place the cell at the top on the new view, and have it populated, without needing any extra code.
What I have done is loaded the cell from its nib, set it up, and then added the contentView of the cell to my new pushed view. This achieves the desired effect.
UITableViewCell
s are meant to be used inUITableView
s only. Feel free to stick them elsewhere, but you do so at your own risk.