Reload a view

Discussion in 'iPhone/iPad Programming' started by Alhazred, Jul 12, 2011.

  1. macrumors member

    Joined:
    Jul 5, 2011
    #1
    In my app I've put a "logout" button.
    Tapping that button, the app logs out from an online service.
    After this happens I need to reload the same view.
    I've tried with this:
    Code:
    if ([self isViewLoaded]) {
    	self.view=nil;
    	[self viewDidLoad];
    }
    
    But I get this message and the app doesn't work correctly
    nested push animation can result in corrupted navigation bar

    Is there another way to reload a view?
    The app is Navigation-based.
     
  2. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    [self.view setNeedsDisplay];

    Think that's the code you are looking for :)
     
  3. thread starter macrumors member

    Joined:
    Jul 5, 2011
    #3
    Thank you.
     

Share This Page