0
-(Void) searchBarSearchButtonClicked: (UISearchBar *) activeSearchBar {
NSString * query = [searchBar.text stringByReplacingOccurrencesOfString: @ "" withString: @ "+"];
NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "http://www.google.com/search?q =%@", query]];
NSURLRequest * requestObj = [NSURLRequest requestWithURL: url];
[Home loadRequest: requestObj];
}
-(Void) loadView {
[Super loadView];
CGRect bounds = [[UIScreen mainScreen] applicationFrame];
searchBar = [[UISearchBar alloc] initWithFrame: CGRectMake (0.0, 0.0, bounds.size.width, 48.0)];
searchBar.delegate = self;
[Self.view addSubview: searchBar];
}
我不会说英文,并依靠翻译。 由于语言问题,这可能是键盘问题,还是编码问题?“WebKitErrorDomain错误101”想知道原因
错误的原因如下。 如果用韩文书写,会发生错误。 但如果用英文写作,则不会发生错误。