How To Create A Gallery on iOS

后端 未结 8 1479
自闭症患者
自闭症患者 2020-11-30 20:24

I\'m starting to develop a simple application for iOS, and this application is a simple gallery of some photo (taken from a website). The first problem I encountered is how

相关标签:
8条回答
  • 2020-11-30 20:52

    In case that you want to use third party classes, the next tutorials can be mixed, they worked for me. Here's a good grid view:
    custom image picker like uiimagepicker

    And if you want to load them asynchronously, use this: image lazy loading

    Both tutorials are very well described and have source code.

    0 讨论(0)
  • 2020-11-30 20:52

    Um, since ios6 came out, the right way to do this is with Collection Views:

    Apple Docs on CollectionViews

    Also, see the two WWDC 2012 sessions on them:

    Introduction to Collection Views
    Advanced Collection Views

    Sadly, Apple did not include a simple gallery or coverflow layout, but it's pretty easy to make one.

    0 讨论(0)
  • 2020-11-30 20:53

    Here is a very good library called FGallery for iOS

    -Supports auto-rotation

    -thumbnail View

    -zoom

    -delete

    0 讨论(0)
  • 2020-11-30 20:54

    If you don't want to use a third party library, you should do this in UITableView rows. Because of the way UITableView caches cells, it's relatively lightweight in memory. Certainly more so than a possibly very large UIView inside a UIScrollView. I've done it both ways, and I was much happier with the UITableView.

    That said, next time I need to do this? I plan to use AQGridView.

    0 讨论(0)
  • 2020-11-30 21:00

    You should check out AQGridView which does exactly what you are trying to achieve. Even if you want to write your own custom code, have a look at the AQGridView source as more than likely you will need to use a UIScrollView as a base.

    0 讨论(0)
  • 2020-11-30 21:08

    I wrote a tutorial on building a media gallery using a UICollectionView. It populates from the user's photo library. I think it will work perfectly for what you are trying to do.

    iPhone Programming Tutorial: Creating An Image Gallery Like Over – Part 1

    Hope that helps. Cheers!

    0 讨论(0)
提交回复
热议问题