Fonts of text are coming small on IPHone

Discussion in 'iOS Programming' started by manoj.aggarwal, Aug 25, 2008.

  1. macrumors newbie

    Aug 25, 2008

    I have made a web mobileapplication using visual studio 2005. My site is working fine on Blackbery and on safari browser but when I open my application using iphone, fonts of text and size of controls are coming very small on iphone. I am not getting where is the problem. :( .

    I request everybody to help me out in this.
    link to my site is

    You will see it works fine on browser when seen on computer but on iphone the fonts of text and size of controls are very small.

    A lot of thanks in advance.
  2. macrumors newbie

    Sep 4, 2008
    Same problem


    I have the same problem :confused: and I want to know if you could fix it. Can you please let me know hao you corrected it?

    Thanks!!! :)
  3. macrumors 68030


    Sep 2, 2008
    This is by design and is under user control in MobileSafari. When the user rotates the phone the text becomes larger. When the user pinches/squeezes the web page the page zooms in and out. I can make your page so large that only a couple of lines of text appear on screen.

    This is the same for all web pages. Why do you think this is a problem?
  4. thread starter macrumors newbie

    Aug 25, 2008

    I just did two things to solve my problem.

    1. I added

    var currentWidth = 0;
    function fnmove()
    setTimeout(updateLayout, 10);

    function updateLayout()
    if (window.innerWidth != currentWidth)
    currentWidth = window.innerWidth;
    var orient = currentWidth == 320 ? "profile" : "landscape";
    document.body.setAttribute("orient", orient);
    window.scrollTo(0, 1);
    }, 100);

    setInterval(updateLayout, 400);

    script to my application .

    2. added <meta name="viewport" content="maximum-scale=1.0,initial-scale=1.0,minimum-scale=1.0"/> tag in my application .

    it is working fine now .

    A lot of thanks for your replies.
    I hope it will solve your problem.

Share This Page