简体   繁体   English

iOS:UISearchDisplayController和UITableView。

[英]IOS: UISearchDisplayController and UITableView.

I've a question about best object to use in my App. 我有一个关于在我的应用中使用的最佳对象的问题。

I have a three columns UITableView containing a NSString , NSDate , double . 我有一个包含NSStringNSDatedouble的三列UITableView I would like to help users filtering and make the easiest query. 我想帮助用户过滤并进行最简单的查询。 Using UISearchBar i can easily filter the text but i'm not sure. 使用UISearchBar我可以轻松过滤文本,但是我不确定。 I would like to have three different type of search. 我想进行三种不同类型的搜索。 When date is used for exmaple a UIDatePicker . 如果使用日期作为示例,则使用UIDatePicker Which is the best way to proceed? 最好的方法是什么? Thank you in advance for any reply. 预先感谢您的任何答复。

  1)For String  you can use the UISearchBar it will help you to search according to the text entered in it.

  2)For double you can  use the same UISearchBar but you can convert the text which is entered in searchbar as double and proceed filtering with your data.


  3)For NSDate you can give an Option to the user like From Date and To Date so that you can filter and display the records in between the dates

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

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