Last active
January 10, 2017 05:17
-
-
Save NikhilManapure/49dd3e0e4de7db44c993471af0cf3c24 to your computer and use it in GitHub Desktop.
Bad way to write cellForRowAt
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, | |
cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
// Clean up | |
if [self.subviews containsObject: self.someNotoriousView] { | |
[self.contentView removeFromSuperview]; | |
} | |
// Set up(adding that notorious view again based on some condition ) | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment