I would like to show Content in the UIWebView, which I have added to the Project. (for example an image)
I know how to set a text in the UIWebView, but I would like to add images or a video which I have added to the project.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ok, I am assuming you are using loadHTMLString to set the HTML on your UIWebView.
So to reference images that are stored in your App bundle, you just need to get the right path to put in your img tag. So get the path string:
Format some HTML with an image tag:
Then set your HTML on the web view:
You just need to add the images to your app resources (nameOfImage in the code above) and it will work fine.