I have a viewcontroller with with a xib file. The file needs to have a TextField and a Button that leads to another viewcontroller with a web view. I want to have the URL be altered by whatever the user enters into the text field. So for example:
URL in WebView: http://www.google.com/
user enter football into text field
New Url in WebView: http://www.google.com/football
Any help would really be appreciated i already have my “main page” leading to a webview i just need to know what code needs to go were to alter the url.
Thanks in advance. If code is need i can post it
You could use string literals to pass the text of the box to the webview. Like this:
Then, use a custom init method to pass your string to the new view:
Make sure to declare
-(id)initWithAddress:(NSString*)address;in the .h.