Created
March 12, 2016 03:21
-
-
Save warriorg/19f1ca39144d9caf1497 to your computer and use it in GitHub Desktop.
干掉UITableView 最后一个 separatorLine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
if (indexPath.row == formList!.count - 1) { | |
cell.separatorInset = UIEdgeInsetsMake(0, cell.bounds.size.width, 0, 0) | |
return; | |
} | |
cell.separatorInset = UIEdgeInsetsZero | |
if #available(iOS 8.0, *) { | |
cell.preservesSuperviewLayoutMargins = false | |
cell.layoutMargins = UIEdgeInsetsZero | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment