Question

I want to open an URL from the browser in ios. I know how to open an normal url.. but here I want to pass a parameter to the url.... This is what I used to open the url from the browser

NSURL *url = [NSURL URLWithString:@"http://www.iphonedevelopertips.com"]; [[UIApplication sharedApplication] openURL:url];

Then how can I modify this according to pass a parameter

Thanks

Was it helpful?

Solution

here i pass the country name. you can pass anything what you want.

CountryName=@"India";   

NSURL * url=[NSURL URLWithString:[NSString stringWithFormat:@"http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName=%@",CountryName]];

do like this pass whatever you want pass like this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top