PDA

View Full Version : Fonts of text are coming small on IPHone




manoj.aggarwal
Aug 25, 2008, 06:57 AM
Hi,

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 https://rsguru.etelmar.net/rsgmobile/

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.



kpnh
Sep 4, 2008, 02:00 PM
Hi

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!!! :)

PhoneyDeveloper
Sep 4, 2008, 03:21 PM
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?

manoj.aggarwal
Sep 7, 2008, 09:43 AM
Hi,

I just did two things to solve my problem.

1. I added

window.document.attachEvent("load",fnmove);
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);
setTimeout(function()
{
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.