IOS 7 Weather APP Like Transition/Animations

后端 未结 2 2096
感动是毒
感动是毒 2021-02-06 15:20

I would like to implement IOS Weather APP like transition, ListView, tap on list item it expands to detail view, or pinch to list also expands to detail view.

Slide lef

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-06 15:52

    You can definitely pull this off with the transitioning api.

    Check out this project, I think it will help:

    https://github.com/chefnobody/Colors

    I was able to do it using this example from Ash Furrow @ Teehan + Lax: http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/ with some modifications:

    To augment this example to get the pinch/pull table view cell separation animation you would need to identify the table view cell that was selected (or "selected" relative to the pinch gesture"), then in -animateTransition: you animate the actual table view cells above and below the selected cell out of view, revealing your details view controller. Remember, also to animate back to the table view from the details you need to (during the "pop") know which cell would be selected (scrolling it back into view if it's not already in view) then animate the cells surrounding it from off screen, back into view.

    As for the swipe interaction between the different cities you would implement a different InteractionController that handles the transitions there. Again, you can probably follow Furrow's example and figure out how to pull it off.

提交回复
热议问题