我有一个关于在我的应用中使用的最佳对象的问题。
我有三列 UITableView ,其中包含 NSString , NSDate , double 。我想帮助用户过滤并进行最简单的查询。使用 UISearchBar 我可以轻松过滤文字,但我不确定。我想要三种不同的类型的搜索。当日期用于例如 UIDatePicker 时。 哪种方式最好? 提前感谢您的回复。
答案 0 :(得分:0)
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