1

I am working on a navigation based project.

To get from A to B,I do this :

First *firstClass=[[First alloc] initWithNibName:@"first" bundle:nil];

  [self.navigationController pushViewController:firstClass animated:YES];

Then from B to C, I do this:

 Second *secondClass=[[Second alloc] initWithNibName:@"Second" bundle:nil];

 [self.navigationController pushViewController:secondClass animated:YES];


Now, in C, I do this,trying to get back to A:

- (IBAction)goBack: (id)sender

{

[self.navigationController popToRootViewControllerAnimated:YES];

}

By doing this I am successfully able to navigate back to A , but the app crashes when I

change the device orientation in A after moving back , where as it doesn't crash , when A is

loaded first time . Any help on this?

Neo
  • 2,807
  • 1
  • 16
  • 18
Raj
  • 1,119
  • 1
  • 15
  • 32
  • We need more informations to help you. Can you show your orientation methods' implementation please ? – iSofTom Sep 27 '12 at 11:33
  • I am jut doing this - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return YES; } – Raj Sep 27 '12 at 11:35
  • Aren't you implementing new rotation methods ? – iSofTom Sep 27 '12 at 11:36
  • 1
    Since iOS 6, shouldAutorotateToInterfaceOrientation is deprecated, and there are new methods: supportedInterfaceOrientation and shouldAutorotate. – iSofTom Sep 27 '12 at 11:39
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/17236/discussion-between-raj-and-isoftom) – Raj Sep 27 '12 at 11:55

0 Answers0