Somehow, You need to implement tableView(_:heightForRowAt:). For example:
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// pseudo:
/*
if a condition related to hide the indicator (for example response from calling an api to get some data) is true, retrun -for example 100-, else (the response has not been called yet) retrun another value.
*/
}
You can also check the indexPath.row
for chaning a specific row height:
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// check if it is the second row:
if indexPath.row == 1 {
}
}
So, after calling self.tableView.reloadData()
it should be called and assign the new height for the row.
Hope this helped.