Specifically this, I created a UITextField and a UIButton, brief code below:
UITextField * textField = [UITextField alloc] intWithFrame: CGRectMake (10,23,30,5);
[Self.view addSubview: textField];
UIButton * searchButton = [UIButton alloc] intWithFrame: CGRectMake ......
[Self.view addSubview: searchButton];
Then ask how to write code, enabling Button is clicked, based on the keywords entered by the user in the TextField, call safari, content on Baidu network automatically search keywords?
I'm just a beginner, code base is not; This information really find a lot to be found, and sincerely hope to get everyone's help!
Reply:
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: @ "http://www.baidu.com/s?wd=aaaa"]];
No comments:
Post a Comment