ios - Standard Weather app: view hierarchy with same behavior -
i trying understand, how can achieve same vertical scroll behavior (all horizontal behavior looks obvious) in standard weather iphone app. saw this question, it's not enough. goal construct view hierarchy using uiscrollview
's and/or uitableview
's possibly without custom animations. made screenshots 3 different states:
initial state:
"refresh" state (dragged):
detail state (scrolled):
ideas have: separate screen red, yellow, green , blue modules looks nice idea.
1) green + blue area (and yellow?) close uitableview
green module header view, 1 unstandard thing - can move green module top, skipping "refresh" area.
2) in top of red area can interact blue/green modules, move them , down, so, possibly area inset
of uitableview
custom animated uiview
under uitableview
?
we have no way of knowing whats going on since it's apple's source. there not lot of options available design kind of logic weather app has therefore can assume process involved steps similar these.
*you writing fair amount of layout , animation code views moving @ different speeds, custom layouts , other fine details.
- first of need subclass
uicollectionviewlayout
multidirectional scrolling , create custom layouts. subclassing allow total control of design of collection. if ok designing less complex might able design collection-based layout minimal development usinguicollectionviewflowlayout
.
collection view programming guide ios - creating custom layouts
feasible development outline
building custom layout
- populating collectionview
- subclass
uicollectionviewcell
managing outlet connections
building custom layout hold dynamic data
- create
customcollectionviewlayout
, have subclassuicollectionviewlayout
provide collectionview information on cells. layout provides collection view information show user. meaning won't part of ui.
- create
uicollectionviewlayout
uicollectionviewlayout class reference
every layout object should implement following methods conform protocol:
collectionviewcontentsize
layoutattributesforelementsinrect
layoutattributesforitematindexpath
shouldinvalidatelayoutforboundschange
Comments
Post a Comment