Fit image of random size into a UIWebview (IOS)

后端 未结 4 664
名媛妹妹
名媛妹妹 2020-12-10 08:26

\"\"

I want to fit large image into UIwebview with keeping image ratio same as image view.

How can i do

4条回答
  •  一向
    一向 (楼主)
    2020-12-10 08:43

    I have used below code and its working well.

       NSString *imageHTML = [[NSString alloc] initWithFormat:@"%@%@%@", @""
                                     ""
                                     ""
                                     ""
                                     ""
                                     ""
                                     ""
                                     " "];
    
                    [wview_contents loadHTMLString:imageHTML baseURL:nil];
    

提交回复
热议问题