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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 01-15-2010, 10:02 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 12
Olnex is on a distinguished road
Default Setting orientation to landscape but UIScreen's mainscreen still portrate

I created a window based application, deleted the MainWindow.xib file and it's entry in project's info list. Then I manually initialise the window in delegate, also, in the delegate's applicationDidFinish... method I set application's orientation to landscape:

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLand scapeRight animated:NO];

Also, I've set the InitialInterfaceOrientation to UIInterfaceOrientationLandscapeLeft, the problem is, the emulator starts in landscape mode, but the CGRect returned by [[UIScreen mainScreen] bounds] is still the rect in portrait mode.

Did i make something wrong? Or Did I miss something?

Thanks!
Olnex is offline   Reply With Quote
Old 01-15-2010, 11:46 AM   #2 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Kroupy is on a distinguished road
Default

Sure, You just set the Status bar to landscape!

inside your ViewController there is a method which is commented so it isn't being called. It says something like shouldAutoRotate...blablaba.

You have to return YES for your specific orientation.
Kroupy is offline   Reply With Quote
Old 10-22-2010, 12:54 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 22
psudheer28 is on a distinguished road
Default Portrait to landscape Orientation [ screen rect not changed ]

Hi Kroupy/Olnex

Me too have the same problem, i turned it to yes in shouldautorotate method, but still the rect of the screen is in portrait orientation rect, the screen is rotating to portrait to landscape.

How can solve this.

Olnex, did u solve ur's problem. if yes can u plz explain
psudheer28 is offline   Reply With Quote
Reply

Bookmarks

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: 336
9 members and 327 guests
2Apps1Day, akacaj, Domele, michelle, NSString, SLIC, soohyun, Techgirl-52, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,650
Threads: 94,114
Posts: 402,886
Top Poster: BrianSlick (7,990)
Welcome to our newest member, soohyun
Powered by vBadvanced CMPS v3.1.0

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