Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-16-2010, 08:56 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 7
Default iPad Device Orientation "Face UP?"

Pretty funny... Launch your App with the iPad lying flat on a table and ask for the deviceOrientation. The result is UIDeviceOrientationFaceUp.

What I really want to know is what is the orientation of the "desktop" or "home page".

The problem is this:

Your user has rotated the iPad into some position, watching the icons animate into position. He sees your icon and touches it. So when your App launches it is going to want to match that rotation. So you read the device orientation and go from there.

But wait... If the user rotated the iPad and then laid it down flat, he is still looking at your icon facing him. But when he launches your app and you read the device orientation, all you know is UIDeviceOrientationFaceUp. You want to rotate your App so that it is facing the user, but you don't have the correct information until he picks up the device.

Does anyone know how to read the orientation of the "desktop"?

Thanks.
Pitfall is offline   Reply With Quote
Old 04-17-2010, 12:23 AM   #2 (permalink)
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 527
Default

Quote:
Originally Posted by Pitfall View Post
Pretty funny... Launch your App with the iPad lying flat on a table and ask for the deviceOrientation. The result is UIDeviceOrientationFaceUp.

What I really want to know is what is the orientation of the "desktop" or "home page".

The problem is this:

Your user has rotated the iPad into some position, watching the icons animate into position. He sees your icon and touches it. So when your App launches it is going to want to match that rotation. So you read the device orientation and go from there.

But wait... If the user rotated the iPad and then laid it down flat, he is still looking at your icon facing him. But when he launches your app and you read the device orientation, all you know is UIDeviceOrientationFaceUp. You want to rotate your App so that it is facing the user, but you don't have the correct information until he picks up the device.

Does anyone know how to read the orientation of the "desktop"?

Thanks.
I don't have an iPad, so I'm not quiet sure how the up and down orientation works.

Maybe try splash view first...
__________________
iisword is offline   Reply With Quote
Old 04-21-2010, 03:05 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 7
Default One workaround for the FAce Up problem

It seems that if you register for, and start the UIDeviceOrientationDidChangeNotification events you can get multiple Device Orientation Change Event Notifications.

In my example above, reading the device orientation at start always returns Face Up. But once the notifications begin the OS sends a Landscape Left event and follows it up immediately with a Face Up event.

So they eventually tell the App about both orientations.

Depending upon how real-time your App happens to be, if you implement the orientation change notification your device orientation might recover before you notice there is an ambiguity.

I'd still like to be able to read that orientation at start, but this will work with only a fractional time delay.
Pitfall is offline   Reply With Quote
Reply

Bookmarks

Tags
desktop, home page, orientation, rotate, rotation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 1,019
21 members and 998 guests
ADY, Alex_TNT, AragornSG, arfius, eggerr, fanarin, GENnick, janice23, jjaaxx44, Marckov85, markn, mikeirvingapps, nidie, OstinGames2011, premkumarmsc1, rrlemoine, sebasx, SoulRed12, Stut72, Sunny46, undeadlegion
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,488
Threads: 89,095
Posts: 380,135
Top Poster: BrianSlick (7,091)
Welcome to our newest member, Stut72
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0