I got a table View and collection view on the each cell.
When I tapped the cell, following code will be invoked in cell's didSelectRowAt:IndexPath
method.
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
navigationController?.pushViewController(anotherViewController(), animated: true)
}
The anotherViewController
is an empty view controller on storyboard for now. It only print "I'm coming" in viewDidLoad()
.
Here is the problem:
When I touched the cell, the push animation seems got stuck, pleas check the following GIF.
I'm really confused in what's happend.
Feel free to give any Advice.
The following Image shows the view hierarchy.
Cells on the table view.
Collection view and other components on the cell's content view.
At the end, image views on the collection view's content view.
The solution for me was to explicitly set the background color of the new view controller, even if it's black. I had the same issue and since I'm not using storyboard, this was the solution for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With