views:

238

answers:

1

Hi ,

I have created a nib file and added a UIWebView. i created an IBOutlet and attached web view with that outlet. till here everything is fine . now when i set the delegate of that webview to self in ViewDidLoad, and implement two of its delegate methods. the application crashes, i m not writing anything in the methods , i have just implemented and the application is crashing ....

what could b the problem ?

is there any problem ???

A: 

There is a problem if one of the delegate methods is

– webView:shouldStartLoadWithRequest:navigationType:

Indeed, this method returns a BOOL (YES if the web view should begin loading content; otherwise, NO). Therefore, since you are not writing any code inside the method, this may cause a problem. Try inserting in this method the statement

return YES;

The other delegate methods return void, so these should not be the cause of the problem.

unforgiven