HI Team,
Posting an image in web view..
NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
NSURL *bundleBaseURL = [NSURL fileURLWithPath: bundlePath];
NSString *htmlString = [NSString stringWithFormat:@"<html><head><style>body{background-color:transparent}p{font-family:arial;font-size:15px;color:black;}</style></head><body><p>%@</p></body></html>",[array objectAtIndex:0]];
[webview_obj loadHTMLString:htmlString baseURL:bundleBaseURL];
Note:baseUrl Should not be nil
No comments:
Post a Comment