iOS Learning note 15:separatorinset setting UITableView's Split line invalid problem

Source: Internet
Author: User

First, the problem description

UITableView split line to show to the leftmost side

View the properties of the UITableView and find that setting the value of Separatorinset allows you to customize the position of the split line.

// allows customization of the frame of cell separators

Print Separatorinset with default values {0, 15, 0, 0}, top, left, bottom, and right distances are 0, 15, 0, 0, i.e. the left side will have a default 15-pixel blank

Use the following code to set the Uitableviewcontroller UITableView split line. Uiedgeinsetszero equivalent to Uiedgeinsetsmake (0, 0, 0, 0).

1-(void) Viewdidload2 {3     //set the style of a split line4Self.tableView.separatorStyle =Uitableviewcellseparatorstylesingleline;5     6     //set the distance from the boundary of the split line7     if([Self.tableview respondstoselector: @selector (setseparatorinset:)])8     {9Self.tableView.separatorInset =Uiedgeinsetszero;Ten     } One}

Run, found not up to the effect I want, the split line is only the left side of the near, but still not show to the leftmost, as follows:

Second, the problem analysis

iOS Learning note 15:separatorinset setting UITableView's Split line invalid problem

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.