/***
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