In my application there have two Outlet, one is UItextfield and another is UIWebview, textfield used to get the url request by the user and shown it in webview, but I met a problem is when finish the typing in my textfield, and click GO button(return) in the keyboard, that is nothing happen in my webview, my source code as shown in below:
- (BOOL)textFieldShouldReturn:(UITextField *)textField { NSLog(@'clicked'); [textField resignFirstResponder]; [mywebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[textField text]]]]; return YES; }
What is the problem?
Have you set the delegate of the textfield to be the class with the textFieldShouldReturn: method?