Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 06-13-2011, 05:33 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
glbrag is on a distinguished road
Default Issue with font using UIWebView

Hi to all

Could someone help me with this issue?
I use UIWebView to display HTML page but this component seems to be changing fonts size without any reason.
I will give you two screenshots which says it all:

ImageShack Album - 2 images

There are two screenshots here.
One for portrait and one for landscape orientation

It looks like I was using fonts of different size when in fact I don't do that.
All text has the same font family and size.

How should I handle that ?

Thanks

GLBRAG
glbrag is offline   Reply With Quote
Old 06-14-2011, 04:43 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
glbrag is on a distinguished road
Default

I need to display a lot of data in a table and decided that HTML through UIWebView could be the right way. Now I see that there are some issues I didn't even think could happen. Have you encountered any such problem. If so how did you handle it ?

It seems that on landscape mode font size is fine. Why then in portrait mode some fonts are enlarged? I don't understand. There is no logic here.

Thank you for your help
glbrag is offline   Reply With Quote
Old 06-14-2011, 06:02 AM   #3 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

probably something in html.....

post a sample of html that don't work, maybe someone will try and help you....
__________________
dany_dev is offline   Reply With Quote
Old 06-14-2011, 06:19 AM   #4 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 3
glbrag is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
probably something in html.....

post a sample of html that don't work, maybe someone will try and help you....
Thank you for your willingness to help me.
Fortunatelly with the help of freenode #iphonedev chat I figured out the problem.
The reason was the default value of -webkit-text-size-adjust css property.
I was unaware that such a thing exists. It is able to adjust font size when displaing web page on iphone. It should be set to none.

Here is some documentation:
CSS Property : -webkit-text-size-adjust
glbrag is offline   Reply With Quote
Reply

Bookmarks

Tags
css, font, html, size, uiwebview

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: 314
6 members and 308 guests
chemistry, Dnnake, iOS.Lover, lendo, Leslie80, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

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