how to increase or decrease the UIWebview font size, not using scalePageToFit:NO;
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
Here is mine for changing font size and color in UIWebView:
Try this simple method
Swift 3
Older Swift:
Change the font size of the fetched HTML data by changing the occurrence of font size in the fetched html string to your required font size (40 in this example) in a method.
So the html string: span style='font-size: 20px; Becomes: span style='font-size: 40
Note: Change the other occurrences like gt;, apos; too to get the desired string to load in your Webview.
in my case im using a UISlider for the fontSize, can be any float value
I have 2 buttons - A- and A+