View area vs screen size

Discussion in 'iOS Programming' started by youi, Sep 28, 2008.

  1. youi macrumors newbie

    Joined:
    Sep 28, 2008
    #1
    Hi, I am building an iphone optimized website and am confused about the actual size of the viewable area inside the mobile safari browser. The screen height is 480px but after subtracting the address bar at the top and the tool bar at the bottom, the view area goes down to 360px high.

    However it is possible to make the upper address bar retract providing more space. I believe the lower tool bar always remains?

    How do you make the address bar auto retract, and is this the way to go using the upper area of the screen, or should i stick to the reduced 360px within the browser. What are the pros and cons?

    thanks
     
  2. s01ipsist macrumors newbie

    Joined:
    Sep 28, 2008
    #2
    Take a look at the
    Safari Web Content Guide for iPhone OS
    document.
    Chapter 3, Configuring the Viewport
     
  3. youi thread starter macrumors newbie

    Joined:
    Sep 28, 2008
    #3
    Hi, I had a look through 'Configuring the Viewport', but didn't see anything on making the URL text field retract. Is it available for websites, or just apps?

    thanks
     
  4. youi thread starter macrumors newbie

    Joined:
    Sep 28, 2008
    #4
    Anyone know how to make the URL address bar retract?
     
  5. youi thread starter macrumors newbie

    Joined:
    Sep 28, 2008
    #5
    Got it, should have used the word 'hide' not 'retract' in my searching-

    <script type="application/x-javascript">
    function hideAddressBar() { window.scrollTo(0, 1); }
    </script>

    or

    <script type="text/javascript" charset="utf-8">
    addEventListener('load', function() {
    setTimeout(hideAddressBar, 0);
    }, false);
    function hideAddressBar() {
    window.scrollTo(0, 1);
    }
    </script>

    or

    http://iphonemicrosites.com/tutorials/how-to-hide-the-address-bar-in-mobilesafari/
     

Share This Page