Split line problem caused by using Xib/storybord AutoLayout under IOS 8

Source: Internet
Author: User

/***

IOS8 Split Line problem under Xib/storyboard solution

http://qiita.com/yimajo/items/10f16629200f1beb7852

Http://www.cocoachina.com/ios/20141026/10045.html

Http://www.2cto.com/kf/201411/349631.html

http://dev.classmethod.jp/smartphone/iphone/ios-8-uitableview-layoutmargins/

http://demo.netfoucs.com/growinggiant/article/details/42002871

*/

- (void) viewdidload {[Super viewdidload]; //additional setup after loading the view, typically from a nib.[Self.view Setlayoutmargins:uiedgeinsetszero]; //if ([Self.tableview respondstoselector: @selector (setseparatorinset:)]) {//        //[Self.tableview Setseparatorinset:uiedgeinsetszero];//        //    }//    //if ([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) {//        //[Self.tableview setlayoutmargins:uiedgeinsetsmake (0, 0, 0, 0)];//        //    }//[Self.tableview Setseparatorinset:uiedgeinsetsmake (0,0,0,0)]; }-(void) viewdidlayoutsubviews{[Super Viewdidlayoutsubviews]; if([Self.tableview respondstoselector: @selector (setseparatorinset:)]) {[Self.tableview setseparatorinset:uiedg    Einsetszero]; }        if([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) {//[Self.tableview Setlayoutmargins:uiedgeinsetszero];[Self.view Setlayoutmargins:uiedgeinsetszero]; }}- (void) didreceivememorywarning {[Super didreceivememorywarning]; //Dispose of any resources the can be recreated.}-(Nsinteger) TableView: (UITableView *) TableView numberofrowsinsection: (nsinteger) section{return  -;}-(uitableviewcell*) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) indexpath{StaticNSString *id =@"Tableviewcell"; UITableViewCell*cell =[TableView Dequeuereusablecellwithidentifier:id]; if(cell==Nil) {uinib*nib = [uinib nibwithnibname:@"Tableviewcell"Bundle:nil];        [TableView registernib:nib Forcellreuseidentifier:id]; return[[nib Instantiatewithowner:nil options:nil]lastobject]; }//cell.preservessuperviewlayoutmargins = NO;//if ([Cell respondstoselector: @selector (setseparatorinset:)]) {//cell.separatorinset = Uiedgeinsetszero;//    }//    //if ([Cell respondstoselector: @selector (setpreservessuperviewlayoutmargins:)]) {//cell.preservessuperviewlayoutmargins = false;//    }//    //if ([Cell respondstoselector: @selector (setlayoutmargins:)]) {//cell.layoutmargins = Uiedgeinsetszero;//[Self.view Setlayoutmargins:uiedgeinsetszero];//    }    returncell; }//then add the following code to the UITableView proxy method//-(void) TableView: (UITableView *) TableView Willdisplaycell: (UITableViewCell *) cell Forrowatindexpath: ( Nsindexpath *) Indexpath////{//    //if ([Cell respondstoselector: @selector (setseparatorinset:)]) {//        //[Cell Setseparatorinset:uiedgeinsetszero];//        //    }//    //if ([Cell respondstoselector: @selector (setlayoutmargins:)]) {//        //[Cell Setlayoutmargins:uiedgeinsetszero];//        //    }//    //}

Split line problem caused by using Xib/storybord AutoLayout under IOS 8

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.