0

I'm working on a couple of iOS apps that require the user to select a calendar date, and while the built-in date picker widget is all right, I'd much prefer if users could choose days from a calendar grid, similar to how it works in Hipmunk's iOS app. In that app, users are shown an infinite scroll view showing a grid of days, with each cell showing the month and day. The days of the week are shown in a persistent (i.e. non-scrolling) banner.

In addition to simply showing a calendar, this control should allow dates to be highlighted/selected. Better still, users should be able to select a whole range of dates by tapping on the start and end days' cells, at which the whole range of days should be highlighted.

Any ideas?

4

1 回答 1

1

这是一个“无限的” UIScrollView,里面有各种其他的观点。Apple 在他们的StreetScroller项目中提供了一个无限的 UIScrollview 演示。

您将为每天想要显示的各种内容分配和初始化视图,并可能重用顶部的日期视图(当您向左滚动时,您更改日期并将其移到右侧,重用它是 UITableView 传统的方式)。

选择是改变支持您的视图的对象的可见状态的问题。

于 2012-07-11T02:39:30.353 回答