Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tests:[Test]
- override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
- if indexPath.row == 0 {
- return 15
- }
- else if (indexPath.row == 1 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 2 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
- return 0.1
- }
- else if (indexPath.row == 7 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 8 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
- return 20
- }
- else if indexPath.row == 1 && !tests[testIndex].imagesURL.isEmpty && !checkMode {
- return 215
- }
- else if indexPath.row == 1 && checkMode {
- return 150
- }
- else if (indexPath.row == 2 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 3 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
- return UITableViewAutomaticDimension
- }
- else if (indexPath.row == 8 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 9 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
- return 75
- }
- else {
- return UITableViewAutomaticDimension
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement