modifying layer that is being finalized error

Discussion in 'iOS Programming' started by teengohan, May 22, 2011.

  1. macrumors newbie

    Joined:
    May 20, 2011
    #1
    Hi all,

    I am trying to pop a view of the navigation stack but I believe I am doing it incorrectly, my code is:

    Code:
    [self.navigationController popViewControllerAnimated:NO];
    I think the problem is that the view is not getting releaced properly based on google results but I dont know what to do about it.

    The view being popped is a UIViewController with a webview on it. Its superview that I am returning to is a table.

    Can anyone tell me where I am going wrong?
     
  2. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Well.. you are referring to a -> self.navigationController..
    Is your controllers u are trying to "pop" a navigationcontroller.
    If yes. then the code should be correctly, and try log that function.
    If no, add one, because it should work fine.
     
  3. teengohan, May 23, 2011
    Last edited: May 23, 2011

    thread starter macrumors newbie

    Joined:
    May 20, 2011
    #3
    Sorry but I'm really new to this. What do you mean by is the controller a navigation controller? I do have a navigation controller implimented already. I know this because I am able to use this same code to "pop" another view sucessfully.

    How do I go about tracking down the bug? I don't know how to log a function and even if I did I doubt I'd be able to read the log.

    EDIT: when I create the app in the first place I selected navigation based app so my view controller is in my appdelegate.
     
  4. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    I think you should grab a book then..

    Because if you can "PUSH" a view, because u said Pop already, but in your first post you said it isn't working. So that's confusing.
    So, popping one, should work fine

    inside the action u are calling [self.view popView..]
    Insert this.
    NSLog(@"Popping view");

    and check your console if thats logged.
    Then u know it got into the action, if that's not it, your action doesn't get called.
     
  5. thread starter macrumors newbie

    Joined:
    May 20, 2011
    #5
    Figured it out, problem was I was running on empty working all night. I had tried to make my own custom code to jump between views rather than trust the apple way of doing things and let app generate its own navigation buttons. Slept on it and it hit me the moment I woke up :S Thanks for trying to help but noone could have helpped my sleep addled mind :S
     

Share This Page