When I called:
[self.navigationController pushViewController:SOME_VIEW_CONTROLLER animated:YES];
the app randomly stuck (it didn't crash, so no error log). Have tried debugging it with no result.
Note that:
- I called this
pushViewController
from aUIViewController
category. Is there any problem with that? - I am not using storyboard
- The problem persist randomly (it doesn't happen all the time)
- When it stuck,
viewDidAppear
won't be called (viewWillAppear, viewWillLayoutSubviews, viewDidLayoutSubviews
still called) - the problem never occured when I use animated:NO
Some code snippets:
- (void)routeToBookingDetailsForCustomer:(BookingModel *)booking {
VTBookingDetailsForCustomerViewController *vc = [VTBookingDetailsForCustomerViewController new];
vc.booking = booking;
[self.navigationController pushViewController:vc animated:YES];
}
Just found another thread with similar case: pushViewController stuck or viewdidappear fail