Create a UITextField
and a UIButton
. Upon a button click, load the url that was inserted into the text field.
For example, lets assume your text field is called _tf and your webview is called _wv:
- (IBAction)btnClicked
{
[_wv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:_tf.text]]];
}
Of course you need to validate that the entered text is actually a valid URL.