1.tableviewcell Height Adaptive
Main methods:
Calculate cell height [cell.contentview systemlayoutsizefittingsize:uilayoutfittingcompressedsize];
// nslayoutconstraint using conditions to add relative constraints
iOS 7.0 cell height calculation modification:
-(CGFloat) TableView: (UITableView) TableView Estimatedheightforrowatindexpath: (Nsindexpath) Indexpath. Setting Cell height Valuations
-(CGFloat) TableView: (UITableView) TableView Heightforrowatindexpath: (nsindexpath) indexpath calculate cell display Height
After iOS7, the official modification prevents all cell heights from being loaded when loading large amounts of data before loading the data.
A return value of +1 is required to calculate the height.
2.uicollectioncell Height Adaptive
Main methods:
Calculate cell height [cell systemlayoutsizefittingsize:uilayoutfittingcompressedsize];
nslayoutconstraint using conditions to add relative constraints
IOS UITableView uicollectionview Cell height adaptive