1. To add a custom child control to the cell, it is added to the cell's contentview, not to the cell.
2. Custom cell via Xib
* Add TableView
* Load Group Purchase data
* New Xib, get child controls
* Package
* finally introduced Headerview and Footerview (insert AD, load more)
Summary: Custom cell (cell height inconsistency) by code general steps:
1. Create a new class that inherits from UITableViewCell
2. Rewrite Initwithstl amount: Reuseidentifier: Method
1).--. Add all the child controls that need to be displayed (you do not need to set the child control's data and frame, and the child controls are added to Contentview).
2).--. a one-time property setting for child controls (some properties only need to be set once, such as fonts \ fixed pictures)
3.2 Models available
1). Data model: Storing text data \ Picture data
2). Frame model: The height of the Frame\cell that holds the data model \ All child controls
4.cell has a frame model (don't have a data model directly)
5. Override the Serrer method of the Frame model property: Set the display data and frame for the child control in this method.
Frame model: There is a frame model, frame model should have a micro-blog data model, the micro-blog data model to frame, frame will take out the microblog model of each property, calculate all the child control frame data.
4. To make the cell a certain distance from the screen border, rewrite the cell's Setframe method.
Change the cell width to the left and the width of the x
Change the spacing between the two cells: first, add a distance to the cell's height, and then subtract the added height here.
Some knowledge of customizing the cell