Uderc programming article aggregator sites

Gettin my app to autorotate

Answers: Have 14 answers
My app got rejected for not autorotating so I am trying to implement that now.
My app is a painting application based off GLPaint. The problem with this is that there is no ViewController class and that is where this code is found that does the autorotation:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceO rientation {
// Return YES for supported orientations
return YES;
So since I dont have this class only a AppController and PaintingView, where do I implement this code. Is it possible to create a view controller and have it link up to control my MainWindow.xib?
If not, then how can I make my app autorotate. Thank you.
The best answer: OK. I am assuming that you are using the OpenGLES Template iPad application to start your project. Why Apple choose to make it look like it does is beyond me, but there you go.
What you need to do is start a View based application, and then copy in the opengl parts of the opengles template project into the view based project. Then in the ViewDidLoad function, you need to create an instance of your OpenGLES View (EAGLView or something like that). You then have an autorotating OpenGLES project. Yay.
There are other issues with doing this, but with a simple project it should be fine. If, like me, you want to run the OpenGL updates in a thread, it then becomes a world of pain, with everything being initialised at the wrong times and crashing in openGL functions etc.... but for what you are doing, this will work perfectly !
Haven't got the code to hand at the moment, but if you look on the web, there should be examples like this.


Related articles

Autorotate bug with 5800 - hope Nokia reads this.

I keep gettin updates from my app store but yet when I go in and update all it starts the update and then pops up and tells me that the application cannot be downloaded at this time. I have had to delete a few apps bc this isn't working.

The autorotation function has stopped working in my text message app. only.  It is working for all other applications.  What has happened? How can I fix it.  The autorotate is on.


PhotoLocations, or CoreData bug? Image autorotates when app saves

I am trying to set up my billing information on my iphone and I keep gettin this for assistance contact itunes support and I just want to download apps and buy songs I need help!

I can't download free apps without a credit card how do I get around this I don't have credit or debit account?

For the average person what really is the point of the activity monitor app when all you really want to know is whether your mac is running at its best?

Autorotate stops when switching view from popover

Updating apps, keeps asking for billing info

Recommended article

Can't get Maps to work in Calendar

Can I get a notice when the files are downloaded by the recipient? And other issues...

HT1918 I am having a hard time setting up my cc info on iTunes. I keep getting a message that says my security code is invalid and it's the exact number on the back of my cc and what I use to purchase products online all of the time. What could be the pro

Email body in taiwanese language

N500 - external monitor in dos/bios mode?

Epson R2400 not printing correctly!

Problem with msdos console

Blank error message in iphoto?

Photoshop instaling for mac

About  SQL*Plus Limits