I have a simple View into IB that contains just a UIWebView and a UIButton.
The webView is retained, connected, not nil, the delegate property os also connected, the Controller is UIWebViewDelegate compliant and set in the .h.
in ViewDidLoad, I use [self.webView loadHTMLString:htmlContent baseURL:nil];
The content loads, but webViewDidFinishLoad is never triggered, neither didFailLoadWithError, neither webViewDidStartLoad.
How can I know when my content has finished loading, as it take a short time, but still a time to load (and I need to do things during that time on display, for an example not showing the button) ?
@interface MyController : UIViewController <UIWebViewDelegate> {
UIWebView* webView;
}
@property (nonatomic, retain) IBOutlet UIWebView* webView;
@end
@implementation MyController
@synthesize webView;
- (void)viewDidLoad
{
[super viewDidLoad];
constructing the htmlString
id a = self.webView.delegate; // for debug
[self.webView loadHTMLString:htmlContent baseURL:nil];
}
@end
EDIT :
I’ve deleted the whole XIB and built it from scrathc : no more problem. IB sucks sometimes.
I’ve deleted the whole XIB and built it again from scratch : no more problem. IB sucks sometimes.