My view controller is an UIViewController
. I've added UITableView
to the UIView
. When the tableview row is selected, a push segue fires a new view controller. However, when coming back from the new view controller, the selected row stays selected. I didn't have this problem when my first controller was an UITableviewController
, but I had to change it to an UIViewController
, because I wanted to add activity indicator to my view.
The other thing I noticed is that when my first controller was a UITableviewController
, viewDidLoad
wasn't called when coming back from the new view controller (but now it's called).
Add...
[tableView deselectRowAtIndexPath:indexPath animated:YES];
in tableView:didSelectRowAtIndexPath:
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