1
如何使用URL并能够更改部分URL?我是新客服C. 在所有地点的URL错误! 餐厅是我的UIWebView,zip是我的UITextField,restlabel是我的UILabel。Obj C带有可变URL搜索查询的UIWebView
-(void)load {
url = [[NSString alloc] initWithFormat:@"http://www.example.com/search?query=%@", restlabel.text];
}
-(IBAction)gourl {
restlabel.text = [NSString stringWithFormat:@"%@", [zip text]];
[restaurants loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
}
我照你说的和错误仍然显示为“未声明的标识符‘网址’。 – ch1pa 2012-02-20 20:44:36
你从 – jhilgert00 2012-02-20 20:47:37
您的网址变量。@ jhilgert00你可以把失踪NSURL使用,在代码对我来说? – ch1pa 2012-02-20 20:51:30