Answer the question
In order to leave comments, you need to log in
Implement popup menu under TableViewCell, how?
In what way it can be implemented?
While the idea is this - we have a custom cell with a layout constraint (the distance from the bottom of the 1st view to the bottom of the 2nd view), which we save in the cell properties, didselectrowatindexpath
we get the selected cell and change this layout. Any other ideas?
Answer the question
In order to leave comments, you need to log in
Everything turns out to be much easier.
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
selectedIndexPath = tableView.indexPathForSelectedRow
tableView.beginUpdates()
tableView.endUpdates()
}
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if selectedIndexPath == indexPath {
return 107
} else {
return 50
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question