2013-10-22 19 views
0

我正在我的應用程序在iOS 5,6和7 在iOS 5和6我的tableview沒有任何分離器,但在iOS 7分離運行的應用程序時,細胞之間出現。不需要分隔符是顯示在iOS 7

我用下面的代碼,但仍隔板可見在iOS 7

if ([self.tableView respondsToSelector:@selector(setSeparatorStyle:)]) { 
    [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; 
} 

另外,我用這樣的代碼:

if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { 
    [tableView setSeparatorInset:UIEdgeInsetsZero]; 
} 

我在viewDidLoad方法把上面的代碼。但沒有任何工作適合我。

是否有任何其他的方法來隱藏/刪除的分離器,iOS的7

enter image description here

感謝,

+0

如果可能的話,請分享TableStyle(分組/平原)和截圖。 – Roshit

+0

只是檢查在廈門國際銀行的分離器還是否是默認還是我使用的平原TABLESTYLE什麼 – Tendulkar

+0

。我已經添加表視圖的快照屬性 –

回答

0

不要用你的

if ([self.tableView respondsToSelector:@selector(setSeparatorStyle:)]) 

財產separatorStyle是適用於所有iOS。

@property(nonatomic) UITableViewCellSeparatorStyle separatorStyle;    // default is UITableViewCellSeparatorStyleSingleLine 

我在我的代碼使用,並與iOS7完美地工作:

_table.separatorStyle = UITableViewCellSeparatorStyleNone; 
+0

我已經在使用榫文件分隔符樣式無。請參閱問題中附帶的圖片。 –

+0

你試過了嗎? – AncAinu

+0

是的,我試過但它對我沒有用。 –

0

嘗試改變分離器顏色以清除

enter image description here

0

嘗試設置在細胞上的插圖:

cell.separatorInset = UIEdgeInsetsMake(0, CGRectGetWidth(cell.bounds), 0, 0);