mercredi 5 août 2015

Creating a iOS scrollable timeline view


I'm trying to create a timeline view in iOS that can be scrolled both horizontally (time) and vertically (cities). I'm having trouble finding if there is something made from before that I can look at for help.

The timeline view is a view that have date and time going horizontally and you can move time back and forward with moving finger on the horizontal axis. Vertically you can go future down to see the different rows (cities).

Timeline looks something like this:

Wed 4 Aug
---------
City A
01    02    03    04    ... time continues ->

City B
02    03    04    05

...(cities continue vertically)

What is the best approach to this? I been thinking about UIScrollView, but I have rows (cities) that need to be in place while changing the time.

I have experimented with UIView that has it's own drawRect but that seems less than brilliant to redraw each time user moves a little bit and sounds very heavy on the hardware.

I'm also thinking that different layers of UIViews could solve this, with top layer having the city names and the bottom layer being scrolled, but how could I solve the vertical scrolling?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire