I am testing HTML code on a UIWebView . And I also wish to support iOS 5.x and iOS 6.x. But the problem seems to be related to the font size associated only with iOS 6.x.
That is, when rotating iOS 5.x will make the fonts a little smaller when switching to portrait mode in landscape orientation (which is desirable, since the portrait width is shorter). However, UIWebView in iOS 6.x will do just the opposite.
The problem does not occur when the same HTML is displayed in Safari iOS (both 5.x and 6.x), as the font size always scales as expected during rotation.
It may be something that I missed UIWebView , hope someone knows can help explain this.
In addition, the aforementioned problem occurs on my test device iOS 6.1 for iPhone 5. Please comment if you do this or not find a similar problem. Want to know if this is only related to this particular phone (or its settings).
Last update:
The above problem should be related to how the project (which was launched long before iOS 6 was available). Since a new test project with UIWebView and UIView was set up in some different basic settings, and text UIView during rotation seems to be approved for both ios 5 and 6. The problem may be with the custom layout. A setup code is used that is only good on iOS 5. In fact, there is greater compatibility between versions 2 of ios.
Stanley
source share