Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 9, 2013, 02:17 PM   #1
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Floating Rotation Control?

Hi,

I'd like to have an on screen way for the user of my app to swap between locked portrait, locked landscape, and unlocked autorotate.

First off, is there any good existing code I can just throw in for this?

If not, here's what I have in mind:
A 3 segmented control that fades in at the top left corner when a rotation event occurs. If the user doesn't interact with it, it'll fade right out after a few seconds. But if the user does interact with it, it should force the interface to rotate whichever way the user says it should. Except I don't want the control to. The rest of the app, the keyboard, and the status bar should all rotate, but the control shouldn't (so accidental touches are quick to undo.) I think this might be accomplishable by placing it in a seperate UIWindow. Will this work? Is it a good idea?
ArtOfWarfare is offline   0 Reply With Quote
Old Feb 11, 2013, 03:00 PM   #2
Duncan C
macrumors 6502a
 
Duncan C's Avatar
 
Join Date: Jan 2008
Location: Northern Virginia
 
Quote:
Originally Posted by ArtOfWarfare View Post
Hi,

I'd like to have an on screen way for the user of my app to swap between locked portrait, locked landscape, and unlocked autorotate.

First off, is there any good existing code I can just throw in for this?

If not, here's what I have in mind:
A 3 segmented control that fades in at the top left corner when a rotation event occurs. If the user doesn't interact with it, it'll fade right out after a few seconds. But if the user does interact with it, it should force the interface to rotate whichever way the user says it should. Except I don't want the control to. The rest of the app, the keyboard, and the status bar should all rotate, but the control shouldn't (so accidental touches are quick to undo.) I think this might be accomplishable by placing it in a seperate UIWindow. Will this work? Is it a good idea?

What you describe MIGHT be possible, but more likely not. You are altering the flow of autorotation that Apple designed, and introducing a number of twists.

When the device detects a rotation, it asks your current view controller which orientations it should supports, and then triggers a rotation if the current orientation is one of them. By the time you could show a segmented control, that interaction would be over, and the UI will have either rotated or not. I don't know of a way to then introduce a UI rotation after the fact.

If you're determined to implement this UI, you might need to turn off all system-based UI rotation and implement your own that manipulates your view hierarchy yourself and simulates UI rotation.

Beware that if you get all this working, you run the risk that Apple might reject your app as not following their HIG (Human Interface Guidelines.) They don't like it when you make significant changes to their UI conventions.
__________________
Regards,
Duncan Champney, WareTo.
Check out our latest iOS app, Face Dancer, available for free on the App Store.
Duncan C is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Fun with iPhoto! Floating Pictures! FelicityW Mac Applications and Mac App Store 4 May 16, 2014 02:59 PM
Help! Do I get this Annoying Floating Bookmarks Menu to go away?! VideoNewbie Mac Basics and Help 1 Sep 1, 2013 09:29 AM
iPhone 5 Floating Keyboard nickelz27 iPhone 10 Apr 12, 2013 11:14 AM
Galaxy S4 rumored to support floating gestures. KnightMan Alternatives to iOS and iOS Devices 38 Feb 12, 2013 07:27 AM
Floating point validation Narendar Singh iPhone/iPad Programming 8 Jul 21, 2012 02:05 PM

Forum Jump

All times are GMT -5. The time now is 10:13 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC