问题
I'm building an iOS app that would benefit from having the time from say 07:00 to 16:00 (specified by user) on the left of a UITableViewCell like this:
What would be the best approach for such a behaviour, including the possibility of a colored rectangle over several cells? I imagine you would design a custom cell but it's the colored rectangle (appointments in the iOS calendar) logic that I'm not sure how to go about as it stretches over several cells.
Could someone point me in the right direction, give any links or something to kick me off? Just an explanation of how one would go about this is helpful.
Thanks alot! Erik
回答1:
I think you need to look into UICollectionView, with provides powerful layout apis for this kind of problem than UITableView.
There are a lot to dig into though.
Some of these materials maybe helpful to you:
http://www.objc.io/issue-3/collection-view-layouts.html
https://github.com/erichoracek/MSCollectionViewCalendarLayout
来源:https://stackoverflow.com/questions/29653219/ios-tableview-with-time-at-the-left