[iphone] How to resize a web view in iphone SDK?

for my iphone app, I need my webview to expand to the bounds when I change to landscape mode. How do I get it to auto-resize?

It appears that the problem is the UIView that contains the UIWebView is not being properly resizes, the UIWebView is resizing to match the UIView, but the UIView is not resizing to match the available space.
I'm loading this view from a nib file and my controller is not in the Interface Builder FYI.
here is my current viewDidLoad method. I have tried various combinations ofr autoresizingMask as you can see below (commented out), but they didn't get the view to resize to match its container (not sure what contains the view).
- (void)viewDidLoad {
view.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight);
NSString *urlAddress = @"http://www.people.carleton.edu/~cdavidso/images/BadileHiRes.jpg";
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//view.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight);
webView.scalesPageToFit = YES;
//webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight);
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
Also, here is a screen shot of my interface builder:
http://www.grabup.com/uploads/fe652f916b8a70036eeb2f52cdbb6cae.png
and a screen shot that shows that the View is not resizing to fit the window:
http://www.grabup.com/uploads/b19cd56c2386599182d6c48f3f34e495.png
I could try the frame approach, but not sure what to set the view frame to.
thanks
phil

Similar Messages

  • HT4972 I just got a new iMac and want to use it for iTunes.  when i connect my iPhone how do i transfer everything in my iPhone to this new computer?

    I just got a new iMac and want to use it for iTunes.  when i connect my iPhone how do i transfer everything in my iPhone to this new computer?

    If you do not have access to your old PC/Laptop and therefore cannot transfer your iTunes library, this document is very useful https://discussions.apple.com/docs/DOC-3141

  • I recently bought a new iphone 5s from UAE , but unfortunately i did not find the facetime on my new iphone, how come that i bought a new iphone with missing options , please help

    i recently bought a new iphone 5s from UAE , but unfortunately i did not find the facetime on my new iphone, how come that i bought a new iphone with missing options , please help

    Your earlier phone must have been originally intended for sale in another country and must have been purchased from somewhere other than an authorized Apple retailer. Phones that are intended to be sold in the UAE have FaceTime permanently disabled. The option is not there and cannot be made to work.

  • HT201269 I had lost my iPhone and bought a second hand iphone. how transfer contract to my second hand iphone?

    I had lost my iPhone and bought a second hand iphone , how
    To transfer contact to my second hand iphone ?

    Do you have a backup of your contacts in iCloud or iTunes? If yes, you can sign in or sync from either one.

  • IPhone - How long do the speakers on an iPhone last?

    iPhone - How long do the external speakers on an iPhone last? In tech specs says 30 hours but I believe it lasts 30 hours only with the earbuds and not with the external speakers. Any thoughts?

    FYI - the iPhone includes a single speaker - the opposite grill that appears the same is the iPhone's microphone.
    It makes no difference.
    The 3Gs offers "up to" 10 hours of video playback, or 30 hours of audio playback on a full charge at original capacity. Using the external speaker will not use more battery than using the earbuds but if so, the difference will be negligible.
    This is also included as a footnote.
    All battery claims depend on network configuration and many other factors; actual results will vary.
    To get the most battery out of Audio playback, turn Airplane mode on so all iPhone radios will be off.

  • How to resize the web page, accidently minimised the webpage, unable to resize it.

    while surfing using my laptop, i have re sized the appearance(font size) of my gmail and facebook pages. Other web pages are ok. I'm now unable to re size it back and unable to use the site as the font size is too small and not readable.
    Appreciate any suggestion.

    Try to reset the zoom level.
    View menu > Zoom > Reset
    If you have the orange Firefox button, tap the Alt key to display the classic menu bar to get to the View menu.
    Any luck?

  • Anyone know how to resize .mac web gallery icons for iweb?

    Totally confused.

    I have not been able to, but you can export Flickr slideshows and make them any size you want.
    Check out what I have started :
    http://web.mac.com/ikarl67/Karl,_Laurie_and_ConnorKyhl/Welcome.html

  • How do i delete other on my iphone, How do i delete other on my iPhone

    I have no space on my Iphpne becaue 'Other" is taking over 9g's on my phone.. How do i detele it off my phone with out loseing everything?
    Ive tried Restoring the phone more then 4 times but nothing has changed. at some points I had to delete more Pictures and apps becaude
    the phone said that it was over capacity and other times it would say "Phone can no be restored from Back-Up because there is not enough
    space on the phone" even though The phone has no songs or apps on it. Even when i remove the songs off the Iphone It shows up in
    summery that the songs are still on my phone.

    you can restore it as new and start over, but it will be like a new phone.

  • IPhone doesn't play Quicktime Web-Export for iPhone (not cell!)

    Hello guys,
    I play around with the html5 video tag and the possibilities to get implemented videos working on the iPhone. I exported the video via the standard function in Quicktime (Encoding Video for Wi-Fi, 3G, and EDGE) which is installed on 10.6.
    I implemented the exported reference-mov file in my page but on the iPhone only the cell version is viewable - when WIFI is switched off. If WIFI is switched on the iPhone shows the poster image with the crossed play button in the front but the regarding video (not the cell version) can't be started
    The desktop (computer) version of the same video is displayed on Safari on the MacBook via the reference file.
    Is there someone who knows something about this behavior?
    Kind regards
    André

    This is all to do with MIME types.
    iPhones play .m4v files (as exported from quicktime) but will only accept then if delivered as "video/mp4" not "video/m4v".
    The easiest way to do this to edit you .htaccess file by adding the line:
    ===========================
    AddType video/mp4 mp4 mp4v mpg4 m4v
    ===========================
    Apache Servers should now add that MIME type to their internal list.
    Note: You should still upload the .m4v file (not rename to .mp4 as some have done) - it will now play over wifi.
    Hope this helps and thanks to kingkong36 for the original solution.
    If you are unsure how to edit your .htaccess file then then is lots of documentation online - just search '.htaccess' but a quick method is to make a .txt file containing the above line, upload that to the root file of your site and then rename it '.htaccess' from htaccess.txt - removing the '.txt' first.
    Be careful though that you are not overwriting another file - make sure you ftp software is set to 'Show hidden files' or similar, then edit that one if there is one as files beggining 'dot' are hidden by default.
    Cheers, Tim.

  • I forget the password in iphone, how unlock, i forget the password in iphone, how unlock

    how to unlock or reset iphone as I forget iphone password

    If you have forgotten the passcode, you must restore the iPhone per the instructions in the user guide

  • How do you delete movies from your iPhone, How do you delete movies from your iPhone

    How can you delete movies and tv shoes from your iPhone with the iOS 7

    Please read this article how to delete movies from your iphone.
    http://support.apple.com/kb/PH3304

  • HT1539 the movie uploaded to my itunes but it wont show in my movie folder when i want to add it to my iphone. how do i get it into my iphone

    how do i transfer my movie to my iphone. its showing up on itunes but it wont show up when i want to put it on my phone

    I FIGURED IT OUT. THANK FREAKING GOD!
    This is what I did:
    I went to control panel and unistalled iTunes completely, then I installed 10.6.3
    http://support.apple.com/downloads/#itunes which you can find here
    It came up with an error saying that my library had beed used with a more updated verision, basically had to upgrade. I installed iTunes 10.7
    After it had installed and iTunes was running I hooked up both my iPhone and my flash drive, I have more than 1 usb port I figure most computers do now, and by the time and date in the bottom right corner a small icon came up showing that I had devices hooked up. It showed both my iPhone (but did not know what it was) and my flash drive. If you right click on the iPhone it has the option to Troubleshoot it. I did it and my iPhone 5 now FINALLY SYNCS!
    I'm sooo happy now.

  • How to get Purchased Ringtones back on iphone, How to get Purchased Ringtones back on iphone

    I purchased 4-5 ringtones over a period of time and got my phone replaced in england since then i dont have them on my phone how do it get them back ? Please help

    Welcome to the Apple Community.
    Uncheck the ringtones in your sync options in iTunes and apply, check them again and apply once more.

  • How to delete music and photos on iPhone, How to delete music and photos on iPhone

    I have too much media in my phone memory but I am not able to delete these files....
    Including music and photos

    You manage what is synced to your iPhone in iTunes. See: http://support.apple.com/kb/ht1535

  • Got a new iphone , how to delete all contacts from old iphone

    I got new iphone 3gs and now I want to delete all the contacts and photos from my old iphone 3g. Any ideas?

    Two choices: 1. Plug your 3G in, iTunes running, hit the restore button. Restore the phone as a new device. Eject when finished, do not sync. 2. Plug the phone into a wall outlet(can take several hours), then: Settings>General>Reset>Erase All Content & Settings.

Maybe you are looking for

  • To delete a request from ODS

    Hello all, I am not able to delete the request from ODS . It gives the error message :no request found in the change log. how shlould i delete the request?? thnx in advance. Regards, Dhanya.

  • Forefront Endpoint Protection 2010 updates are not listed as expired

    Hello, so I am working on getting the right update groups setup within SCCM2012. I ran into a bunch of updates for FEP2010 that should be expired, but they are not, how do I expire them? To be more specific, these are listed as good updates but shoul

  • Robohelp 10 -Solution -IE- Active X blocking script

    Currently we are using robohelp10 for generating webhelp documents. We purchased that too.. Now we are facing following issues,     1. Active x is blocking our script in IE- Please suggest us some solution to unblock that programmatically .     2. Go

  • Window Bar just like in Mac OS 9

    Hi, I would like to know if there is any way to have that button on the windows, that make the whole window dissapear and just left the bar with the title and buttons of close and other two. Thanks for the help!

  • Having problem with folders on exchange mail setup

    I set up email using exchange on ipad and it works fine, I see the inbox, sent and trash folders.  I set up another device and it is syncing my inbox with my server, but it is not showing me the sent or trash boxes.  Can someone help