ios – tableView will not reload variety of rows
[ad_1]
I am making a tableView
with 7 rows (days of week).
After tapping month
button I am altering variable from week
to month
and reloading desk information from click on occasion operate.
Information are reloaded however a lot of rows will not be altering.
Right here is my code
func tableView(_ tableView: UITableView, numberOfRowsInSection part: Int) -> Int {
var rowNumber = 0
if self.dateInnerState == "week" || self.dateInnerState == "" {
rowNumber = 7
} else if self.dateInnerState == "month" {
rowNumber = self.currentMonthDays.rely
} else {
rowNumber = 12
}
print(">>>>", rowNumber, self.dateInnerState)
return rowNumber
}
that is what a technique above prints after month
button pressed
>>>> 30 month
Additionally information within desk are modified, however the quantity or rows stays at 7…
[ad_2]