Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 ios 中从浏览器打开一个 URL。我知道如何打开一个普通的 url.. 但在这里我想将一个参数传递给 url.... 这是我用来从浏览器打开 url
NSURL *url = [NSURL URLWithString:@"http://www.iphonedevelopertips.com"]; [[UIApplication sharedApplication] openURL:url];
那么我该如何根据传递参数来修改它
谢谢
在这里,我通过国家名称。你可以传递任何你想要的东西。
CountryName=@"India"; NSURL * url=[NSURL URLWithString:[NSString stringWithFormat:@"http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName=%@",CountryName]];
像这样通过任何你想要通过的方式。