views:

539

answers:

1

I am using UINavigationController and getting intermittent display issues when going back, popping and pushing view controllers. Sometimes the nav bar will show the current and previous view's nav bar overlapped buttons and text, sometimes the view will change but the nav bar doesn't, sometimes the nav bar changes, but the view doesn't.

I'm doing nothing fancy, usually using using a left "back" button, and doing pushViewController.

I find that if I remove objects from the table in the view, this happens more. Any ideas?

  • (void)viewDidDisappear:(BOOL)animated { //zzz sometimes back doesn't go back[aValues removeAllObjects]; [super viewDidDisappear:animated]; }
A: 

I had a similar problem.

Take a look at the question if you're interested.

The short answer for me was that I had created a buggy pop method in a private category for NSMutableArray. UINavigationBar must also add a pop method via a private category. Mine was winning so the views weren't getting popped.

Kevin
Thanks, I will try to do some logging to get more details. I am using private categories to hide methods from other classes (general code, not overriding any pop method). I don't understand what you mean by needing to add a pop method for UINavBar; aren't the UINavigationController's own pop methods good enough?
Jack
In my case i had added a pop method to NSMutableArray (via a category). It wasn't popping (it was returning the item at the top of the stack but not removing it). This was causing the buggy behaviour.
Kevin