I know how to load the images in WebView, now I am trying to embed an image in html and load in UIWebView.
The following are the code which I am using,
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* documentsDirectoryPath = [paths objectAtIndex:0];
NSString* folderPath = [documentsDirectoryPath stringByAppendingPathComponent:@"iOSDevices"];
NSArray* filesCount = [[NSFileManager defaultManager ] folderPath error:nil];
NSString* path = [NSString stringWithFormat:@"%@/%@",folderPath,[filesCount objectAtIndex:0]];
NSString *htmlString = [NSString stringWithFormat:@"<html><body><img src=\"%@\" type=\"jpg\" width=\"320\" height=\"480\"></body></html>", path];
[_webView loadHTMLString:htmlString baseURL:nil];
Am I missing something ?
image name not available,path only get image path,not give image in path,add image name in tag