Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change url of uiwebview when button is clicked?

hi i guess this is pretty simple and hope it will be answered in a easy manner!

how do i change the url of the uiwebview when a button is touched up inside?

meaning to say i will have a single web view and everytime a button is clicked the URL of the webview

changes and a new page is reloaded

thanks

like image 558
AlsonToh-SG Avatar asked Nov 28 '25 00:11

AlsonToh-SG


1 Answers

As you suggest, it's very easy:

-(void)buttonPressed:(id)sender {
  [webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://website.com/"]]];
}

This is all very well documented.

like image 176
Stephen Darlington Avatar answered Nov 29 '25 17:11

Stephen Darlington



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!