I just want to load the content in UIWebview
but I don't want to use initWithString
. Any method is there?
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
if(_data)
{
NSString* content = [[NSString alloc] initWithData:_data
encoding:NSUTF8StringEncoding];
[_data release];
_data = nil;
NSString *jsString = @"window.external =\
{\
'Notify': function(s) { document.location = 'acs://settoken?token=' + s; },\
'notify': function(s) { document.location = 'acs://settoken?token=' + s; }\
}";
content = [jsString stringByAppendingString:content];
//Any method is there instead of initWithString to load the content
NSURL *url = [[NSURL alloc] initWithString:@"JSON URL"];
[webView loadHTMLString:content baseURL:url];
}
}
Any ideas?