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:

enter image description here


"refresh" state (dragged):

enter image description here


detail state (scrolled):

enter image description here

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 using uicollectionviewflowlayout.

collection view programming guide ios - creating custom layouts

feasible development outline

  1. building custom layout

    • populating collectionview
    • subclass uicollectionviewcell managing outlet connections
  2. building custom layout hold dynamic data

    • create customcollectionviewlayout , have subclass uicollectionviewlayout provide collectionview information on cells. layout provides collection view information show user. meaning won't part of ui.

uicollectionviewlayout

uicollectionviewlayout class reference

every layout object should implement following methods conform protocol:

collectionviewcontentsize layoutattributesforelementsinrect layoutattributesforitematindexpath shouldinvalidatelayoutforboundschange


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -