Implementing a CoverFlow View [closed]

2020-07-27 04:21发布

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.

2条回答
forever°为你锁心
2楼-- · 2020-07-27 05:03

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

查看更多
贼婆χ
3楼-- · 2020-07-27 05:15

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)
查看更多
登录 后发表回答