简体   繁体   English

iBooks 风格的搜索

[英]iBooks style of Search

I'd like to perform multiple search operations at the same time and update UITableView as results appear, similar to the iBooks search.我想同时执行多个搜索操作,并在结果出现时更新 UITableView,类似于 iBooks 搜索。

The hard part is to make the table view refresh the display while search is going on.困难的部分是在搜索进行时使表格视图刷新显示。

Any suggestions will be appreciated.任何建议将不胜感激。

You should search in separate thread to UI remains responsive.您应该在单独的线程中搜索 UI 保持响应。 When search has finished and dataSource of UITableView updated you should call:当搜索完成并且 UITableView 的数据源更新后,您应该调用:

[tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM