Thursday, September 8, 2011

UIWebview resizing text on rotation

Ran into a multi-layered problem this morning with UIWebView. I have an app where a table view cell can pop open and reveal a UIWebView. The problem was on rotation - if I rotated the device and then popped up the cell, the text was too big. I found the fix here. I just added this to the html style tag:

-webkit-text-size-adjust: none;

Saving for future reference.