简体   繁体   中英

Apple Music UIKit Transitions: which API(s) should I use to accomplish this?

Apple's new Music app in iOS 9 is a beautiful app. I'm wondering how I'd go about replicating some of its features, including this beautiful transition. The playback tray slides off the bottom of the screen while the artwork itself scales down into place on a UITableView hidden behind the initial view controller. Are these APIs public? If so, how would I go about accomplishing this effect with them?

UIKit过渡

Most likely those are using the APIs for view controller custom transitions. These are most powerful when transitioning to or from or between collection views, but can be used to great effect with any kind of view controller. (Collection views are so much more flexible than table views in this and similar aspects that you sometimes see them used to build otherwise table-looking layouts — I wouldn't be surprised if Music is doing that. There's a great WWDC14 talk on one example of that.)

Apple's resources on the subject include Customizing the Transition Animations in the view controller guide, the Collection View Transition sample code project, and a couple of WWDC talks: Custom Transitions Using View Controllers from 2013 and View Controller Advancements in iOS 8 from 2014.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM