// 通过搜索栏输入文字
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString{
BMKSuggestionSearchOption* option = [[BMKSuggestionSearchOption alloc] init];
option.keyword = searchString;
BOOL flag = [self.searcher suggestionSearch:option];
if(flag)
{
NSLog(@"建议检索发送成功");
}
else
{
NSLog(@"建议检索发送失败");
}
//刷新表格
return YES;
}
//实现Delegate处理回调结果
- (void)onGetSuggestionResult:(BMKSuggestionSearch*)searcher result:(BMKSuggestionResult*)result errorCode:(BMKSearchErrorCode)error{
if (error == BMK_SEARCH_NO_ERROR) {
NSLog(@"%@---%@-----%@=====%@", result.keyList, result.cityList, result.districtList, result.ptList);
}
}
运行结果:
2016-03-21 12:09:59.634 ELaHuo[2404:122629] (
起重机厂,
百色起义纪念馆,
百色起义纪念公园,
武汉起点人力资源市场,
广州起义烈士陵园,
广州宾馆,
7天连锁酒店(北京路步行街店),
起重机厂-公交车站,
起义路-公交车站,
起锚-公交车站
)---(
,
,
,
,
,
,
,
,
,
)-----(
,
,
,
,
,
,
,
,
,
)=====(
<00000000 00000000 00000000 00000000>,
<c5f0a1f9 69e83740 4ac0ea7e 6ba95a40>,
<89ad822c 79e83740 2321dfb1 66a95a40>,
<7909dda5 bc8b3e40 d7cd74af 4a945c40>,
<a95a2e80 b5223740 8c4adbcf b8525c40>,
<557a49be 4d1f3740 7a92fb08 6d515c40>,
<a433fc34 45203740 5d84a369 51515c40>,
<dce27432 00224140 76643103 40375b40>,
<431f68fc e4203740 4416defb 53515c40>,
<6c46dabe 576d4140 626fb2c4 3dc95d40>
)
求问这是为什么?开发中需求使用cityList和districtList里的数据
急求,非常感谢
欲哭无泪啊,换了模拟器就有数据了
对百度地图简直无语啊
iOS9.2版本,对模拟器挨个测试了一下:
4S模拟器有数据,会crash,
6S Plus 没有数据,
5S正常,6正常,6 Plus正常
这也是简直了