Eureka
Eureka copied to clipboard
How can I fix tableview jumping?
-
Environment: Eureka, Xcode and iOS version you are using. Eureka: 4.2.0, Xcode: 9.4.1, iOS: 11.4
-
Any other additional detail such as your eureka form/section/row code that you think it would be useful to understand and solve the problem.
There is a section header view which belongs to the first section, its hight is 300, and several PickerInlineRows are under other sections. Just rows initialization code.
It seems that it was doing height calculation there.
I think this is a bug of iOS UITableView. This unexpected result also exists in the official Calendar app on iPhone. However, if you try to hide and show some rows by some conditions, you will find this broken animation as well. Hope someone can fix this.
@pandaApe I fixed this issue by removing
tableView.estimatedRowHeight
and setting
tableView.rowHeight = UITableView.automaticDimension
tableView.sectionHeaderHeight = UITableView.automaticDimension
add empty label row at first, just after the section <<< LabelRow() { row in
}
I faced #1875, seems like TextAreaRow and PickerInlineRow are the only two that set the "height" parameter. This is driving me crazy. Adding LabelRow doesn't work.
@pashikua , how do you "remove estimatedRowHeight"?