Implementing a CoverFlow View [closed]

╄→гoц情女王★ 提交于 2020-01-01 18:56:16

问题


I have to create a view where I have to put in a CoverFlow of Images. How can I crete it? There would be images with labels that can explain the image.


回答1:


There are plenty of ways to do it

  • If you application is iOS6+ only and don't need to support iOS5, you can use UICollectionView to implement it. You will need to build some custom layout -- see session 219 of WWDC'12 here after you have logged in using your Apple ID. You can also find plenty of tutorials on the net, simply google for the UICollectionView keyword.
  • If you need to support iOS5 or earlier, or if you don't want to build your own custom UICollectionViewLayout, you can use some of the already made classes -- there are a lot of them around on the net. One of the most famous being iCaroussel on github, which is free, compatible with multiple versions of iOS (not only iOS6), and allows you to do almost every kind of caroussel, including iCarouselTypeCoverFlow and iCarouselTypeCoverFlow2 types (see the README on its github)



回答2:


A UICollectionView in iOS6 will allow you to do this. Look at the WWDC 2012 Videos (on developer.apple.com):

  • Session 205 - Introducing Collection Views
  • Session 219 - Advanced Collection Views and Building Custom Layouts

To get the videos:

  • Login to developer.apple.com and click on "iOS Dev Center" (on the left)
  • Then under "Development Videos" (on the left) click on WWDC 2012
  • You may be prompted to sign-in again but after that you can just click on the video
  • All the WWDC 2012 videos are also available on iTunesU

The videos also show example code.

There is also example code on Github: Coverflow example



来源:https://stackoverflow.com/questions/12769719/implementing-a-coverflow-view

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