[ad_1]
I’ve 3 sections and their corresponding cells tips on how to make it develop/collapse? I’ve created an struct having expanded:Bool worth
under are my code.
*THIS IS MY cellForRowAt *
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
swap (indexPath.part) {
case 0:
if let cell1 = tableview.dequeueReusableCell(withIdentifier: "TimeCardDetailedTableViewCell", for: indexPath) as? TimeCardDetailedTableViewCell{
return cell1
}
case 1:
if let cell2 = tableview.dequeueReusableCell(withIdentifier: "MessageDetailedTableViewCell", for: indexPath) as? MessageDetailedTableViewCell{
return cell2
}
case 2:
if let cell3 = tableview.dequeueReusableCell(withIdentifier: "CrewDetailedTableViewCell", for: indexPath) as? CrewDetailedTableViewCell{
return cell3
}
default:
return UITableViewCell()
}
return UITableViewCell()
}
—>>that is numberOfRowsInSection
func tableView(_ tableView: UITableView, numberOfRowsInSection part: Int) -> Int {
swap (part) {
case 0:
return self.timecards.rely
case 1:
return self.msglog.rely
default:
return self.profile.rely
}
}
How one can implement enlargement on part.im new to iOS
[ad_2]