A class that inherits from UITableViewCell is created, creating a. xib file at the same time that the class was created, populating the cell with Uiimageview, and its frame adjusted according to the cell's frame. Add the following methods in. m:
-(ID) Initwithstyle: (Uitableviewcellstyle) style Reuseidentifier: (NSString *) reuseidentifier{ = [Super Initwithstyle:style reuseidentifier:reuseidentifier]; if (self) {// [self Configui]; } return self ;}
Due to poor consideration, there is no use of xib in TableView, so the above method of initialization is used.
dumbfounded, if the height returned in the Heightforrowatindexpath is greater than the cell itself Height,cell in the ImageView according to the cell frame adjustment, cell adjustment is not in place, the lower blank.
If the height returned in Heightforrowatindexpath is less than the cell itself, the cell collapses in Height,tableview.
The concept is not clear enough to understand why. A temporary solution is to set the cell's self.frame.size.height to match the return value in Heightforrowatindexpath.
"iOS issue record" about UITableViewCell height, padding