Advertisement
Guest User

Untitled

a guest
May 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  var tests:[Test]
  2.  
  3.  
  4.  
  5. override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  6.     if indexPath.row == 0 {
  7.       return 15
  8.     }
  9.     else if (indexPath.row == 1 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 2 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
  10.       return 0.1
  11.     }
  12.     else if (indexPath.row == 7 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 8 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
  13.       return 20
  14.     }
  15.     else if indexPath.row == 1 && !tests[testIndex].imagesURL.isEmpty && !checkMode {
  16.       return 215
  17.     }
  18.     else if indexPath.row == 1 && checkMode {
  19.       return 150
  20.     }
  21.     else if (indexPath.row == 2 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 3 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
  22.       return UITableViewAutomaticDimension
  23.     }
  24.     else if (indexPath.row == 8 && (tests[testIndex].imagesURL.isEmpty && !checkMode)) || (indexPath.row == 9 && (!tests[testIndex].imagesURL.isEmpty || checkMode)) {
  25.       return 75
  26.     }
  27.     else {
  28.       return UITableViewAutomaticDimension
  29.     }
  30.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement