I've read the posts here, but cannot quite adapt them to my needs. I have:
-(IBAction) abouthtml
{
NSString *urlAddress = [[NSBundle mainBundle] pathForResource:@"about" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
CGRect webViewRect = frameWebSpace;
UIWebView *myWebPage=[[UIWebView alloc] initWithFrame:webViewRect];
[myWebPage loadRequest:requestObj];
[self.view addSubview:myWebPage];
}
This displays fine, but my "Return to Program" submit button in about.html is not working.
I've tried, as suggested in posts here:
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType
{
if (navigationType == UIWebViewNavigationTypeFormSubmitted)
{
....
But obviously, nothing links myWebPage to webView. Can someone suggest what I'm missing? Do I need to make webView a delegate of myWebPage? Confused, but hopeful...