2016-08-26 21 views

回答

0

請在代碼中添加此並運行該項目。 enter image description here

+0

謝謝您的回答。 – luky

+0

您必須謹慎 – Sanjukta

1

試試這個: -

添加這個你在哪裏聲明你的表視圖

[self.tableView setContentInset:UIEdgeInsetsZero]; 
// Set seperator to start from zero 
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) 
    [self.tableView setSeparatorInset:UIEdgeInsetsZero]; 

並把這個在你的cellForRowAtIndexPath方法

cell.layoutMargins = UIEdgeInsetsZero; 
cell.preservesSuperviewLayoutMargins = NO; 
+0

cell.layoutMargins = UIEdgeInsetsZero;訣竅了。謝謝 – luky

+0

不客氣:) – Arun