UICollectionView - Zoom Transition like iOS7 Calendar

本小妞迷上赌 提交于 2019-12-20 10:47:23

问题


I'm trying to replicate the zoom-to-detail transitions of the iOS7 calendar (and photos) apps in my app with UICollectionView.

I have a UICollectionView grid with flowlayout, and I set a new layout with much larger cell size to get the zoom-in transition.

My problem is the content of the cell. In the calendar app, when you tap on the month in the year-view, the content from the month cell expands as well to the month-view. How to I get that? I researched solutions since this zoom-to-detail seems to be a UI paradigm Apple is propagating for iOS7, but there is no demo app or tutorial available.


回答1:


There is no out-of-the-box solution, though, new iOS 7 API let's you easily achieve that. You should use Custom Transitions between your view controllers to get that, it let's you control the transition between you view controllers in any way you want. Here's a nice article about that. http://www.doubleencore.com/2013/09/ios-7-custom-transitions/

To scale the cell you can, for example, make a snapshot of it and then use Core Animation to scale it to the whole screen, while you detailed view controller is appearing.



来源:https://stackoverflow.com/questions/19002636/uicollectionview-zoom-transition-like-ios7-calendar

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