I have a array in the Objective-C source.
I have to display the contents of array on onclick of a button in Html or Javascript, how to link the Html file in objective C in xc开发者_开发技巧ode.
You can use the uiwebview to display the html content in objective-c
Create a webview in xib and connect it to IBoutlet UIWebView *web; Then write this code wherever you want.And the file should be in the resources folder
NSString *path1 = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"filename"] ofType:@"html"];
NSURL *url1 = [NSURL fileURLWithPath:path1];
NSURLRequest *request1 = [NSURLRequest requestWithURL:url1];
[web loadRequest:request1];
精彩评论