4 about Tableviewcell display is not blank exercise line width and screen

Source: Internet
Author: User

Single room presentation in the simplest language

1-(Nsinteger) Numberofsectionsintableview: (UITableView *) TableView {2 3 //Return the number of sections.4 return 1;5 }6 7-(Nsinteger) TableView: (UITableView *) TableView numberofrowsinsection: (nsinteger) Section {8 //Return The number of the rows in the section.9 return 1;Ten } One A --(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) Indexpath { -UITableViewCell *cell =[[UITableViewCell alloc] init]; thecell.textlabel.text=@"123"; -Self.tableView.tableFooterView =[[UIView alloc] init]; - - returncell; + } -- (void) Viewdidlayoutsubviews + { A if([Self.tableview respondstoselector: @selector (setseparatorinset:)]) { at[Self.tableview Setseparatorinset:uiedgeinsetsmake (0,0,0,0)]; - } - - if([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) { -[Self.tableview Setlayoutmargins:uiedgeinsetsmake (0,0,0,0)]; - } in } - to- (void) TableView: (uitableview*) TableView Willdisplaycell: (uitableviewcell*) cell Forrowatindexpath: (nsindexpath*) Indexpath + { - if([Cell Respondstoselector: @selector (setseparatorinset:)]) { the [Cell Setseparatorinset:uiedgeinsetszero]; * } $ Panax Notoginseng if([Cell Respondstoselector: @selector (setlayoutmargins:)]) { - [Cell Setlayoutmargins:uiedgeinsetszero]; the } +}

4 about Tableviewcell display is not blank exercise line width and screen

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.