swift - indexpath.row reset after 3 inside tableView heightForRowAt -


hi title says index.row never goes 4 instead starts on [2,0]. tableview has 5 rows. don't know when stopped working know sure worked before added timeindex row.

it's "enter address here" field i'm having problem displaying

let timeindex = 2 let datelocation = 1 let locationindex = 4 override func tableview(_ tableview: uitableview, heightforrowat indexpath: indexpath) -> cgfloat {        if userpickeddate && indexpath.row == timeindex {         return 50     }     if userpickeddate && indexpath.row == datelocation {          return 0      }     print("the indexpath: \(indexpath)")     if remindmeonlocationswitch.ison && indexpath.row == locationindex {         return 100      }     if remindmeonday.ison && indexpath.row == datelocation{         return 300     } else if indexpath.row == datelocation || indexpath.row == timeindex || indexpath.row == locationindex  {         return 0     }     return 50  } 

tableview

console output

console output

you can check have in numberofrowsinsection

    func tableview(_ tableview:uitableview, numberofrowsinsection section:int) -> int {     if(section == 0){     return 1     }     else if(section == 1){         return 2     }else{         return 3     }  } 

should wrong number of rows being set in numberofrowsinsection


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -