Greetings
This question seems to be an ongoing saga in the iphone SDK world ... so my contribution ...
There were two separate projects from the same template ... one is a semi-finished product, the other is not at all ... Please let me explain my steps ...
used this basic GL ES template //iphonedevelopment.blogspot.com/2008/12/opengl-project-template-for-xcode.html had to figure out some "Release" configuration, but in other situations there is everything I need to add orientation to the GL ES project.
One of my first projects, did my stuff, then added these methods ....
-(BOOL)shouldAutoRotateToInterfaceOrientation ..... -(void)willRotateToInterfaceOrientation .... -(void)didRotateFromInterfaceOrientation .... -(void)willAnimateRotationToInterfaceOrientation ....
And to understand what they are doing (or trying to do in my case), (BOOL) follows ... is called once when creating the view controller and returns "YES". But after that, none of the other methods are called!
So, I started from scratch with an empty template (GL ES one on top) ... and added a minimum to support automatic rotation. But this time, none of the methods called!
So, I explored .... //developer.apple.com/iphone/library/qa/qa2010/qa1688.html as he said, I first added GLViewController.view and then added GLview as application delegate routines. Nothing!
Then it was found //www.iphonedevsdk.com/forum/iphone-sdk-development/44993-how-determine-ipad-launch-orientation.html which states that it allows receiving notifications of directions
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
and then disable them in the view controller ... it makes sense ... did it, nothing ...
I think that notifications can be enabled by default, although since I did not need to include them in the first project, but it still tries to check the orientation (i.e. (BOOL) shouldAutoRotate ...) ...
If anyone can help me, it will be very grateful, because this problem is driving me crazy. Thanks in advance.
The code can be found here ... http://rapidshare.com/files/392053688/autoRotation.zip
NB These projects avoid nib / xib resources, I would like to keep them that way, if possible.
IPad device iPad does not come out where I am, so I still can not test the device. It would be nice to work on a simulator.