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 09-12-2008, 04:05 PM   #1 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 1
Default Another Landscape thread.

Hi everyone,

I have read a bunch of threads on how to make my application landscape, but I'm having a small, but major problem.

What my requirement is to have a window in Landscape mode, that shows an image as its back ground, with an edit control where the user can type a word or two and press a button to submit the information. I don't even know if that is possible?
Since I can't activate the edit control, I don't even know if the keyboard shows up correctly when the application is in landscape mode!


Here are the steps so far:
1. I created an application using the Window-Based Application wizard.
2. I placed an edit control on the window.
3. Then I put an entry in my info.plist for UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight. This caused the application to put the status bar along the right edge of the iphone, but the window was still in portrait mode.
4. I added these lines to the applicationDidFinishLaunching method to rotate the window:
window.transform = CGAffineTransformMakeRotation(M_PI/2);
window.center = window.center; //no sure what this is really going to do!

At this point the window was rotated but I couldn't see my edit control, as the window was still (0,0,320,480). There were two black area on either side of the window. Seemed like it didn't resize the window to fit the landscape mode.

5. So I added this line before the two above.
window.bounds = CGRectMake(0,0,480,320);

At this point the window is displayed correctly. But I can't interact with the edit control on the window, when I click on it to fill it in nothing happens!


Thanks

Last edited by AcePilot; 09-12-2008 at 04:18 PM.
AcePilot is offline   Reply With Quote
Reply

Bookmarks

Tags
landscape

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: 245
13 members and 232 guests
2WeeksToGo, ADY, BrianSlick, Dani77, Dattee, headkaze, kapps11, mer10, mgon987, sneaky, timle8n1, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,744
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

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