iPhone Development - Setting UIWebView font

后端 未结 9 2090
别那么骄傲
别那么骄傲 2020-11-28 04:00

I have to show rich text that i pull from server, so i\'m using UIWebView. Now the problem is that i have no control over the font which is used in UIWebView. How can i chan

9条回答
  •  醉话见心
    2020-11-28 04:42

    another easy way that worked for me

        UIFont *font = [UIFont systemFontOfSize:15];
    
          NSString *htmlString = [NSString stringWithFormat:@"%@",
                         (int) font.pointSize,
                         [bodyText stringWithNewLinesAsBRs]];
           [myWebView loadHTMLString:htmlString baseURL:nil];
    

提交回复
热议问题