ios - UIWebView opening URL after google search makes app to crash -
i don't know reason uitextfield
data, "facebook", call code
- (ibaction)searchforaddress:(id)sender { [self loadrequestfromaddressfield:_addressfield]; } - (void)loadrequestfromaddressfield:(id)addressfield { nsstring *urlstring = [addressfield text]; [self loadrequestfromstring:urlstring]; } - (void)loadrequestfromstring:(nsstring*)urlstring { nsstring *composedurlstring = [nsstring stringwithformat:@"http://www.google.com/search?q=%@",urlstring]; nsurl *url = [nsurl urlwithstring:composedurlstring]; nsurlrequest *urlrequest = [nsurlrequest requestwithurl:url]; [self.webview loadrequest:urlrequest]; }
now uiwebview loads correctly giving me result of google search, problem when try enter link crashes giving me error
terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[webviewcontroller searchurl:]: unrecognized selector sent instance 0x8f38540'
what problem??
please check if webviewcontroller
have methode name searchurl
basic error.
it means calling method on instance of webviewcontroller not implemented in it. if still unable fix issue can paste code in question can take @ it.
Comments
Post a Comment