根据 iphone sdk 中的日期对数组进行排序
我有一个表格视图,其中包含从网络服务加载的值。其中包含日期值,如下所示:
"Title":"Title1",
"StartDate":"9\/15\/2011 12:00:00 AM",
"EndDate":"10\/15\/2011 12:00:00 AM".
我已经使用 NSDateFormatter 完成了格式化,我得到的输出为:
theDate: |09/22/2011|
theTime: |14:09:30 PM|
现在我需要根据每个标题的相应日期对表视图中的标题进行排序。我怎样才能实现它?请分享您的想法...
我需要在按钮操作上实现此功能,即应该在按钮操作上执行排序功能。
谢谢...
I have a tableview with values loaded from a web service. Which contains date value, here is how it looks like :
"Title":"Title1",
"StartDate":"9\/15\/2011 12:00:00 AM",
"EndDate":"10\/15\/2011 12:00:00 AM".
I have done formatting using NSDateFormatter, I got the output as:
theDate: |09/22/2011|
theTime: |14:09:30 PM|
Now I need to sort the Title in the tableview with respect to the corresponding dates of each title. How can I implement that? Please share your ideas...
And I need to implement this function on a button action, that is the sorting function should be performed on a button action.
Thank you...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标题也是如此。
The same goes with titles as well.