set a delegate for UIWebView
问题 How do I set a delegate for my UIWebView to use webViewDidFinishLoad ? 回答1: In the interface file indicate that you're interested: @interface SomethingController : UIViewController <UIWebViewDelegate> { Then in your implementation you'll add that delegate method: - (void)webViewDidFinishLoad:(UIWebView *)webView { // Do whatever you want here } Obviously SomethingController should be your actual controller, and UIViewController is whatever you're actually implementing. This, by the way, is