In my application, a custom form is loaded into a UIWebView. Part of the of the required information to be submitted is an image (which is required). How would I be able to add the image to the form before it is submitted.
As side question, would be easier to go the other way around and pull the form information into Objective-C objects and send everything through an NSURLConnection?
You can use any of the HTML editor (or coding it manually) to create the html file and insert the image(s)…. So, let’s say you have created a myhtmlfile.html and one image with the file called “image1.jpg”. You would include these two files (myhtmlfile.html and image1.jpg) in your bundle (added them to your project).
And in Objective-C (iOS), you can use use the loadHTMLString method of the UIWebView like so:
Assuming myWebView is the instant of your UIWebView. The key here is that both the html file and the image file(s) needed to be in your main bundle.