Search code examples
iosobjective-ciphoneios7

Navigation bar back button method


I want to navigate to the particular page in my application and i also dont want to create any custom back button for that.If I can override the method of the navigation bar back button so I can call the poptorootviewcontroller.so i can go to specific page. Anyone knows what is the method that is called by the navigation bar button and if we can use it?


Solution

  • You can try this.. Write your logic in this native method.

    -(void) viewWillDisappear:(BOOL)animated {
    
        [super viewWillDisappear:YES];
        // Your Code
    }