NSInvalidArgumentException when updating WebView from AppDelegate
- by H.Protagonist
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'