"iOS issue record" about UITableViewCell height, padding

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.