Gettin my app to autorotate

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.

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.

Similar Messages

  • Autorotate bug with 5800 - hope Nokia reads this.

    Hi
    I've seen other posts on this issue but thought I'd posy my experience.
    A few weeks after getting this phone (and installing a few apps), the autorotate became erratic e.g. stuck in landscape or portrait & wouldn't respond to phone movements
    I called Nokia support and after a rather painful conversation (poor line, broken English), I ended up doing a complete reset, which worked.
    Reinstalled apps and it worked fine for a few weeks.
    Have also installed some music to my memory card.
    Now it's become erratic again - and the sensor appears to work because the Spirit Level app works fine.
    The only way I can get it to work properly is by starting the phone 3 times - after 1st autorotate doesn't work at all. After the 2nd it's stuck in landscape. After the 3rd it works.
    So at least (for the moment) I can get it to work - but hardly ideal !!
    I don't appear to be alone with this problem, so I hope Nokia can find out where the problem lies & fix it.
    PS I'm on v4 software (no v5 upgrade for O2 in UK yet).

    I haven't actually tried the phone for a prolonged period without any apps installed, so not sure about the incompatibility suggestion. May be it would do the same then as well after a few weeks ?
    As I said, it did run for a few weeks fine (without adding any further apps).
    I'd be interested to know how an app that's not running can screw up the autorotate for the phone software, but still allow another app to run with the sensor working fine (Spirit Level).
    How do I reinstall the v4 software ? Will it damage any data/apps ?

  • 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.

    I keep getting updates from my app store but yet when I go in and update it starts the process but then a message pops up that says the download cannot be done at this time. I have had to delete a few apps because of this. I have also signed out and signed back into my account and turned my phone on and off and still does the same thing. Help!

    Hi tmcrae
    First check that your device is not full, maybe you may have to delete some photos or apps to make space to do updates. if its not full then you will have to try pluging it into your pc/mac running itunes then doing a backup and restore. Then you should be able to do your updates.
    Sorry but i cant think of any other way if its showing as installed already but is not there.
    Hope that helps
    Delboy1066

  • 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.

    The autorotation function has stopped working in my text message appnly.  It is working in all other apps.  The autorotation is turned on!  What has happened?  How do I correct this?

    1. Try quitting the Messaging app
    Double tap the Home button, hold the app icon until it wiggles, tap the red dot, tap the Home button twice
    Relaunch
    2. Reset: Hold the Sleep/Wake and Home buttons until the screen goes dark and the Apple logo appears

  • HT4528 MY NEW PHONE IS NOT BACKING UP LIKE IT SUPPOSE TO AND IM NOT GETTIN ALL MY APPS MUSIC AND PCITURES

    my new phone will not back up all my pics and apps ???? and music

    Hello reneep44,
    Thanks for using Apple Support Communities.
    These two articles explain what iCloud backs up and how to manage the storage.
    iCloud: iCloud storage and backup overview
    http://support.apple.com/kb/PH12519?viewlocale=en_US
    Here’s what iCloud backs up:
    Purchase history for music, movies, TV shows, apps, and booksYour iCloud backup includes information about the content you have purchased, but not the purchased content itself. When you restore from an iCloud backup, your purchased content is automatically downloaded from the iTunes Store, App Store, or iBooks Store. Some types of content aren’t downloaded automatically in all countries, and previous purchases may be unavailable if they have been refunded or are no longer available in the store. For more information, see the Apple Support article iTunes in the Cloud availability by country. Some types of content aren’t available in all countries. For more information, see the Apple Support article Which types of items can I buy in my country?.
    Photos and videos in your Camera Roll
    Device settings
    App data
    Home screen and app organization
    iMessage, text (SMS), and MMS messages
    Ringtones
    Visual Voicemail
    Managing your iCloud storage
    http://support.apple.com/kb/ht4847
    You can also free up storage space by moving or deleting old email messages that you no longer need.
    Have a nice day,
    Mario

  • PhotoLocations, or CoreData bug? Image autorotates when app saves

    Image data saved using CoreData rotates when you bring it up again. What is the best way to handle this?
    If you run the sample code PhotoLocations, take a picture and save it. Note that a thumbnail is saved as well, but goes through something similar to the following code:
    CGRect rect = CGRectMake(0.0, 0.0, size.width, size.height);
    UIGraphicsBeginImageContext(rect.size);
    [selectedImage drawInRect:rect];
    UIImage *thumbnailImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    Technically the image has been saved, as managedObjectContext save... has been called. You can view the image and thumbnail any number of times before you exit the app and all looks okay. But if you exit the app and go back in, you'll see the original photo is now rotated counter-clockwise. The thumbnail, however, is not.
    My app is using similar code. As a workaround I've taken to running the "selectedImage" through the same code as the thumbnail (see above, using it's own size dimensions). For some reason this prevents the autorotation behavior. But it seems wasteful, and takes longer to save the photo.
    Any other suggestions on how to handle this? And is this some kind of bug in CoreData persistence or due to some other cause?

    Have you looked for any auto-rotation code attached to/embedded in the original captured image? What happens if you pass an image that isn't camera generated?

  • 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 keep getting this support pop up and I cant set up an account please help

    Go here:
    https://expresslane.apple.com/Issues.action
    Ask for assistance, as directed.

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

    I need help gettin apps without credit card what can I do?

    Protonic wrote:
    To purchase apps, you will need to pay through Debit card. It will be done through transfer.
    (PayPal, MasterCard etc.)
    Debit cards and PayPal are not accepted payment options in most countries.

  • 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?

    I have had my imac for nearly 18 months now,
    It's okay, is the best I can say about it.
    It cost me around £800+
    So recently (and foolishly!) I downloaded OS Mavericks when I was actually looking for a freebie word processor programme (I got Bean because it's simple like me.)
    Now the point of all this is that Mavericks has new features like a redesigned Safari (But I ain't noticed any difference yet) and Imaps (Huh!) and Ibooks and Imovie or something.
    So when you are oldish like me, you really don't want people to keep changing and introducing new stuff (most of which is pointless anyway) all the time; because it takes us old ***** a while to get used to the last "improvement."
    So you try and get rid of all these new apps that you don't want and didn't ask for anyway,
    and then you find out you can't, because they're an integral part of the new OS.
    Brilliant!
    Then you find that Mail has to redo itself and this thing no longer works properly etc. and you start wishing you hadn't got up that morning...
    So you try and get it all back the way it was..
    And you can't.
    Because you don't have an external hard drive to use the Time machine back up facility.
    So you get in touch with Apple Support and it's now nearly bedtime, but at least you feel like you might be gettin' somewhere.
    You talk to the supportguy and suddenly you can't remember what the problem is and what your name is, and you're thinking you might as well order in a pizza seein' as you've drunk the last of the gin..."
    Anyway the guy manages to keep his temper and you get some degree of order restored but the machine still seems "jumpy" so someone says to you
    "Check out the Activity Monitor! That'll tell you if something's not working right."
    So you do, but it doesn't.
    Just a bunch of numbers and CPU stuff and User Idiot Input etc.
    All you really want is some little box to pop up and say,
    "Hey! yyyou've really ssscrewed things upppp-p here, old mmmmman!!. This programme is no longer functioning properly, that thing appears to frozen, and you just wiped half your saved photos of Aunt Jessie's 94th birthday celebration (the one's where she had her eyes open)..
    Press here for a full maintenance overview and repair menu.."
    By this time you are on the floor, your leg's got cramp and you really really need a pee.
    But there ain't no maintenance programme, just an activity monitor app you can't make any sense out of, so you yank the **** power cord out of the socket and go to bed..
    So you try and

    DVD-R media that is single layer has 4.3 GB formatted capacity.
    DVD+R DL media has 7.8 GB formatted capacity.
    DVD-R double sided has 4.3 GB on each side.
    Message was edited by: a brody

  • Autorotate stops when switching view from popover

    Hi guys. This is my first post here (on my first iOS app) so please be gentle
    I have my iPad app set to Autorotate between both right and left home button landscape modes.
    Everything seams to be working fine when i build and run. Auto rotation works and only admit landscape modes.
    In my view controller i have a button linked to a popover with 4 other buttons to swich to 4 different views.
    When i switch to any of those other views autorotation stops working.
    All those views have the same code to accept autorotation:
    - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
    The popover also has that code and is displaying the buttons in the correct way when I rotate the screen. I assume that the popover is autoratating fine, but the rest of the view stays upside down.
    I'm switching views from the popover with the following code:
    - (IBAction)GotoView02{
    View02ViewController *View02 = [[View02ViewController alloc] initWithNibName:nil bundle:nil];
    [self presentModalViewController:View02 animated:NO];
    Any ideas why autorotation stops working?

    Same problem here, happening both in the simulator and on the device itself.
    Have you found a solution yet?

  • Updating apps, keeps asking for billing info

    i have a problem up-dating my apps on my iphone 4s, i keep gettin massage telling me i need to enter billin infomation but when i do, i get decilined massage and wont let me up-date anything on my apple account, driving me crazy plz help

    You Apple ID is not tied to a free account. The only way to create a free account is by downloading iTunes to your computer, then go to the App store with in iTunes, find a free App then click on the word free. There it will prompt you to enter your Apple ID or create an account. Select create an account. From there you can move forward with creating a free account. Next to the Credit card (on the second page of the set up) options will be a Free Box instead. Let me know if you need help with how to make your current account free. What do you currently use you Apple ID to do?

  • Trying to purchase item in a chinese app? payment help

    i am tryin to purchase game gold however, i am gettin the error of please contact itune support. please help

    You can't currently delete an account (any content that you purchased/downloaded via it will remain tied to it), but you should be able to log out of the currently logged in account by tapping on the id in Settings > iTunes & App Stores (Settings > Store on iOS 5 and below) and you can then log in with a different account.

  • IOS 7.0.3 Autorotate Not Working

    Just installed iOS 7.0.3 and right away noticed that Autorotate is not functioning. I tried a few things in Settings and finally got the "desktop" view to respond to being landscape format, which is my preference, as I use a Zagg Folio with my iPad 2, but, when I open any apps, they immediately rotate to portrait format after opening.

    Sounds like auto-rotate is locked. Go to Settings>General>Use Side Switch to>And make your choice.
    Or go to the Control Center. One of the buttons locks auto rotate, and that might have been activated.

  • Some apps do not rotate keyboard to landscape

    I purchased a used iPhone 4 and reseted it to defaults.
    All is fine but sometimes keyboard does not rotate to landscape.
    Double clicked button and checked autorotate is unlocked.
    These are some apps that don't rotate keyboard:
    Reminder
    Search Contacts
    Search Apple Store
    Settings text
    Facebook
    These do rotate:
    Calendar
    Evernote
    Messages
    Mailbox
    Is that something regular? Could it be changed?
    Thank you

    Also, after I added a second user, it required me to enter my password in Dvorak. This is a new iMac 24 onto which I transfered files from an iMac 20 that once used Dvoark as its primary input format. However, that computer was switched to the US format long before the new iMac 24 was purchased.
    A strange coincidence is that the iMac 20 also went through a period where the second user account required Dvorak format for the password even though that user account only used US format. Any ideas?
    Thanks for the help.

  • 3gs screen displaying autorotate lock

    My 3gs screen shows an autorotate screen lock icon beside the battery meter and the screen has stopped rotating and i have tried in vain to unlock it. Please , i love this and would love to have it restored back to normal. I have tried resetting, almost everything. It does rotate normally only in the camera mode but not in any other mode like typing or playing back videos or photos.

    Double-click the Home button to bring up the recent Apps tray. Swipe the tray to the right to show the lock switch at the left. Clear the lock.
    If this does not work restart or reset the iPhone:
    Restart iPhone: Press and hold the Sleep/Wake button until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the Sleep/Wake until the Apple logo appears.
    Reset iPhone: Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears.
    If none of these work restoring the phone may be necessary.

Maybe you are looking for