I have created a NSObject class and included , in the init i create a uiwebview set the delegate to self and send the load request.
For some reason webViewDidFinishLoad or didFailLoadWithError never get fired. I can't figure why.
//
// RXBTest.h
#import <Foundation/Foundation.h>
@interface RXBTest : NSObject <UIWebViewDelegate>
@end
// RXBTest.m
// pageTest
#import "RXBTest.h"
@implementation RXBTest
- (id) init
{
if((self=[super init])){
UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
[webView setDelegate:self];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/"]]];
}
return self;
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
NSLog(@"ERROR LOADING WEBPAGE: %@", error);
}
- (void) webViewDidFinishLoad:(UIWebView*)webView
{
NSLog(@"finished");
}
@end
anybody has any ideas?
thanks rudi