The following in viewWillAppear
[SYPTableView setSeparatorInset:UIEdgeInsetsZero];
Works fine on iOS 7 but on 6.1 it raised the exception :
NSInvalidArgumentException', reason: '-[UITableView setSeparatorInset:]: unrecognized selector sent to instance
My purpose is to remove the cell border.
The separatorInset
property is available on UITableView
from iOS 7.0 and that's why you get the exception on iOS 6.1.
From the code you posted it looks like you want to remove the default inset introduced in iOS 7. Such inset is not present in iOS 6, so you only have to remove the inset in iOS 7.
You can check whether the table view responds to setSeparatorInset:
doing
if ([SVPTableView respondsToSelector:@selector(setSeparatorInset:)]) {
[SYPTableView setSeparatorInset:UIEdgeInsetsZero];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With