NSInvalidArgumentException when updating WebView from AppDelegate

Posted by H.Protagonist on Stack Overflow See other posts from Stack Overflow or by H.Protagonist
Published on 2012-12-06T07:21:27Z Indexed on 2012/12/06 11:05 UTC
Read the original article Hit count: 162

I had to do an update in my WebView from the Appdelegate.m

I try it like this:

[self performSelectorOnMainThread:@selector(loadWebViewWithContent:) withObject:requestObj waitUntilDone:NO];

The loadWebViewWithContent Method works great from ViewController.m, but not from the Appdelegate.

I allready wrote this in my Appdelegate.h:

-(void)loadWebViewWithContent:(NSURLRequest *)requestObj;

Whats wrong? Please help me. I´m still a big Noob in IOS.

Error:

-[AppDelegate loadWebViewWithContent]: unrecognized selector sent to instance 0x1f86a5e0*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate loadWebViewWithContent]: unrecognized selector sent to instance 0x1f86a5e0'

© Stack Overflow or respective owner

Related posts about ios

Related posts about webview