...Maybe someone could check this for me.
Just trying to get the basics of a simple UIWebView working....
I got this:
Then when i run it the web view loads fine but i dont get any output in the console for webViewDidStartLoad, webViewDidFinishLoad or webView:didFailLoadWithError
Anyone know why? :S
Just trying to get the basics of a simple UIWebView working....
I got this:
Code:
@interface BookmarkMiniViewController : UIViewController <UIWebViewDelegate> {
UIWebView *webPage;
}
@property(nonatomic, retain) UIWebView *webPage;
Code:
@synthesize webPage;
- (void)viewDidLoad {
//web view
webPage = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 120)];
[webPage setDelegate:self];
NSURL *pageURL = [[NSURL alloc] initWithString:@"http://www.google.com/"];
[webPage loadRequest:[NSURLRequest requestWithURL:pageURL]];
webPage.scalesPageToFit = YES;
webPage.userInteractionEnabled = YES;
[self.view addSubview:webPage];
}
Code:
-(void)webViewDidFinishLoad:(UIWebView *)wView {
NSLog(@"Finished\n");
}
-(void)webViewDidStartLoad:(UIWebView *)wView {
NSLog(@"Started\n");
}
-(void)webView:(UIWebView *)wView didFailLoadWithError:(NSError *)error {
NSLog(@"Error\n");
}
Then when i run it the web view loads fine but i dont get any output in the console for webViewDidStartLoad, webViewDidFinishLoad or webView:didFailLoadWithError
Anyone know why? :S