0

I have a UIViewController with a XIB-file which contains a button. In the IBAction method of the button I create a new UIViewController with just one WebView.

UIViewController *onlineViewCtrl = [[UIViewController alloc]init];
[onlineViewCtrl.view addSubview:WebView];

I present this new ViewController:

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

That works as expected but now on iOS versions <6 I have an issue with the autorotation of the screen.

The onlineViewCtrl does not rotate! Normally I would include the autorotate methods but how should I do that in case of the onlineViewCtrl where I don't have a own class or xib?

It is interesting that on iOS 6 everything works perfectly. Does anybody know why? But more important how does it work on iOS <6?

Thanks in advance.

jszumski
  • 7,430
  • 11
  • 40
  • 53
chris13
  • 640
  • 5
  • 14
  • refer [this post](http://stackoverflow.com/questions/12551247/autorotate-a-single-uiviewcontroller-in-ios-6-with-uitabbar) it may help you – Dipen Panchasara Apr 02 '13 at 18:01
  • Sorry that answer did not help. Again, basically the question is how do I implement the autorotate methods for my programmatically "onlineViewCtrl". In Java I would simply make an anonymous class... – chris13 Apr 12 '13 at 15:35

1 Answers1

0

Finally I found a solution: Categories
I have created my own category for a NavigationController and added the autorotate methods.

chris13
  • 640
  • 5
  • 14