Last active
November 17, 2016 14:54
-
-
Save alvareztech/423dcb39001a38d444eaec24f50badf6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { | |
bool hasImage = false; | |
for item in self.object.fields { | |
if String(item.type) == Constants.IMAGE { | |
hasImage = true | |
} | |
} | |
switch indexPath.section{ | |
case 1: | |
if indexPath.row == 0 { | |
if (hasImage) { | |
return 200.0 | |
} else { | |
return 0.0 | |
} | |
} else { | |
return 44.0 | |
} | |
default: | |
return 44.0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment