最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ios8 UITableView設(shè)置 setSeparatorInset UIEdgeInsetsZero不起作用的解決辦法(去掉15px空白間距)

 更新時間:2016年02月21日 15:24:02   作者:來碗雜醬面  
這篇文章主要介紹了ios8 UITableView設(shè)置 setSeparatorInset UIEdgeInsetsZero不起作用的解決辦法(去掉15px空白間距)的相關(guān)資料,需要的朋友可以參考下

但是在ios8中,設(shè)置setSeparatorInset:UIEdgeInsetsZero 已經(jīng)不起作用了。下面是解決辦法:

首先在viewDidLoad方法加入以下代碼:

if(leftTable!.respondsToSelector("setLayoutMargins:")){
leftTable?.layoutMargins=UIEdgeInsetsZero
}
if(leftTable!.respondsToSelector("setSeparatorInset:")){
leftTable!.separatorInset=UIEdgeInsetsZero;
}

然后在UITableView的代理方法中加入以下代碼:

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if(cell!.respondsToSelector("setLayoutMargins:")){
cell!.layoutMargins=UIEdgeInsetsZero
}
if(cell!.respondsToSelector("setSeparatorInset:")){
cell!.separatorInset=UIEdgeInsetsZero;
}
}

這樣不出意外的話,Table的分割線就沒有空白間距了。

以上內(nèi)容給大家介紹了ios8 UITableView設(shè)置 setSeparatorInset UIEdgeInsetsZero不起作用的解決辦法(去掉15px空白間距),希望對大家以上幫助!

相關(guān)文章

最新評論

竹山县| 斗六市| 虞城县| 江门市| 宜丰县| 定远县| 买车| 津南区| 清水河县| 东宁县| 会东县| 孝义市| 礼泉县| 泌阳县| 岢岚县| 积石山| 磐安县| 旌德县| 马边| 河间市| 炎陵县| 四会市| 勐海县| 阿克陶县| 遂宁市| 新竹市| 西盟| 涪陵区| 长春市| 娄底市| 临海市| 鄂伦春自治旗| 阿城市| 武义县| 保定市| 北流市| 云南省| 曲周县| 北辰区| 崇明县| 宽城|