iOS tableView with time at the left

非 Y 不嫁゛ 提交于 2020-01-06 14:12:13

问题


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:

  1. http://www.objc.io/issue-3/collection-view-layouts.html

  2. https://github.com/erichoracek/MSCollectionViewCalendarLayout



来源:https://stackoverflow.com/questions/29653219/ios-tableview-with-time-at-the-left

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!