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 08-05-2008, 11:13 PM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Unhappy zooming webpage and keyboard orientation

Hi,

I'm now playing with iPhone SDK. But I'm having troubles and spending lots of time so far. If anyone can answers this question, that would be really appreciated!!!

(1) Automatically zoom webpage??

Suppose I load "yahoo.com" on my App by using UIWebView.
When I rotate the device from portrait to landscape, I want to automatically zoom webpage when the device is landscape.

I tried

myWebView.contentMode = UIViewContentModeScaleAspectFill;

But, it didn't seems to work.
Can anyone tell me how?

(2) Keyboard showed on webpage in landscape??

Suppose I load "google.com" on my App by using UIWebView and want to search for something by typing into search field.

When I tap text-field and allow keyboard to show up, the keyboard comes up in portrait if the device is portrait. On the other hand, when I flip the device and the device gets landscape, the keyboard has to come up in landscape. But, my app always make the keyboard portrait even when the device is landscape...

I write couple of things for the webView's orienation, but those didn't work for keyboard orientation. For example,

I did make myWebView respond to the orientation
myWebView.autoresizesSubviews = YES;

And I did also implement the following.

(BOOL)shouldAutorotateToInterfaceOrientationUIIn terfaceOrientation)interfaceOrientation
{
return YES;
}

Actually those two worked for the webpage's orientation, but not for the keyboard orientation. Can anyone tell me what to do for the orientation of the keyboard used in webpage.


Your help will be really appreciated
Thanks a lot,
hogeo
hogeo is offline   Reply With Quote
Old 08-05-2008, 11:49 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2008
Posts: 121
Default

Hi!

I've posted here and the official Apple developer forums regarding the keyboard in landscape issue, searched all over google and unfortunately it doesn't look like this is possible. I'm hoping someone can correct me, though I'd love to be able to display the keyboard in landscape mode.

Even if I force the UIDeviceOrientation ( I think that's what it's called...i'm not at my development computer right now ) to UIDeviceOrientationLandscapeLeft and the keyboard still comes up in portrait mode, however it's in the wrong the position and actually animates off-screen

Anyone have a solution for this?
RegularKid is offline   Reply With Quote
Old 08-06-2008, 04:00 AM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Default

>RegularKid

Thanks!
I also tried UIDeviceOrientation by specifying the orientation, but didn't make it.

So, after all, doesn't Apple support this kind of action??

I still would love to implement keyboard in landscape, though.
hogeo is offline   Reply With Quote
Old 08-13-2008, 11:03 PM   #4 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 15
Default

Did you try:
-(BOOL)shouldAutorotateToInterfaceOrientationUIIn terfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return( interfaceOrientation == UIInterfaceOrientationLandscapeRight );
}

This has allowed me to have a landscape keyboard when in landscape mode.

However, I have not been able to figure out how to make the keyboard always show up in landscape only mode if the app is in landscape only mode.
cowboyB is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, keyboard, landscape, orientation, web

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: 267
17 members and 250 guests
ADY, Alsahir, dacapo, Dani77, Desert Diva, Duncan C, F_Bryant, Grinarn, HemiMG, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,761
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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