App crashes on device rotation

Discussion in 'iOS Programming' started by Sergio10, Apr 26, 2010.

  1. Sergio10 macrumors regular

    Joined:
    Oct 3, 2007
    #1
    Hi,

    When navigate between views then previous view I release.

    If during navigation to rotate device then app crashes

    In each view I have next code:
    Code:
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
    { 
        return NO; 
    }  
    
    Also tried override this method but it still crashes. Please help
     
  2. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #2
    When you say you release the previous view what do you mean? It sounds like you are just releasing all your view controllers or something. Unless you need orientation capabilities, you can just comment those whole sections out. If you comment them out and it still crashes, you have some other problem in your code
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    You sure you want to return NO all the time (which basically means don't allow any rotation)?
     

Share This Page