开发者

What happens in UIWebView when "Go" Button is touched

If you have a UIWebView with a textfield and a button that takes the value from that textfield and then performs some action.开发者_Go百科

When you touch the textfield, the keyboard is displayed with a Go Button. I'm trying to figure out what exactly happens under the hood when that Go Button is pressed?

How I would simulate that action programmatically?


The following will be used, when user press on GO button of Keyboard ...

     NSString *urlAddress = mytextFieldText.text;
    //Create a URL object.
    NSURL *url = [NSURL URLWithString:urlAddress];
    NSURLRequest *aRequest = [NSURLRequest requestWithURL:aURL];
    //load the index.html file into the web view.
    [aWebView loadRequest:aRequest];

Thanks

Check the below SO post for listening to keyboard GO button in UITextField.

Dismiss iphone keyboard

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜