Created
October 16, 2015 10:36
-
-
Save ccabanero/b14c752ebfc3f7dfcc1a to your computer and use it in GitHub Desktop.
remove uitableviewcell indentation
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
// For removing the separator line indentation from a UITableViewCell | |
override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
if(tableView.respondsToSelector("setSeparatorInset:")) { | |
tableView.separatorInset = UIEdgeInsetsZero | |
} | |
if(tableView.respondsToSelector("setLayoutMargins:")) { | |
tableView.layoutMargins = UIEdgeInsetsZero | |
} | |
if(tableView.respondsToSelector("setLayoutMargins:")) { | |
cell.layoutMargins = UIEdgeInsetsZero | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment