比 320要轻量级的相册 (ios)

转载 2012年03月28日 21:26:33

https://github.com/kirbyt/KTPhotoBrowser


KTPhotoBrowser

KTPhotoBrowser is a lightweight photo browser for the iPhone and iPod touch. It looks and behaves like the Photos app found on the iPhone.

  

Build the included Sample app to see it in action.

Requirements

Requires iPhone OS SDK 3.0 or greater.

Using KTPhotoBrowser in Your Project

To use KTPhotoBrowser copy the source code into your project then add a data source class for your photos. Here is how:

  1. Clone the KTPhotoBrowser git repository: git clone http://github.com/kirbyt/KTPhotoBrowser.git.
  2. Copy the contents in the folder src/KTPhotoBrowser to your project. A simple way is to use the Finder to drag and drop the src/KTPhotoBrowser directory into your Xcode project. Be sure to mark the "Copy items into destination group's folder (if need)" option.
  3. Add a new class to your project called "DataSource" or something similar. This class MUST implement the protocolKTPhotoBrowserDataSource.
  4. Implement the methods required by the protocol KTPhotoBrowserDataSource.
  5. Implement the optional methods if needed.
  6. Create a view controller that derives from the class KTThumbsViewController and stick it inside a navigation controller.
  7. In your view controller's viewDidLoad method call [self setDataSource:anInstanceOfYourDataSource] to display the list of thumbnails in the scroll view.

You can also load the image viewer directly without the thumbnail list. Just copy the code from didSelectThumbAtIndex: in KTThumbsViewController.

Using the Data Source

Implementing the protocol KTPhotoBrowserDataSource in your data source class decouples KTPhotoBrowser from the logic required to retrieve images. This means you can use KTPhotoBrowser with images stored anywhere be it locally, in Core Data, or on the web. KTPhotoBrowser doesn't care where the photos come from.

Please note KTPhotoBrowser does not manage the photos. It is the data source's responsibility to retrieve and cache images as needed. KTPhotoBrowser only displays the thumbnail and full size images as provided by the data source. It does not manage any local cache or the retrieval of the image from a persistence store.

The sample app includes an example of using SDWebImage to load images asynchronously, with caching.


ios下拉刷新,轻量级

  • 2012年09月02日 17:52
  • 385KB
  • 下载

一套开源的 iOS 轻量级框架

MACProject传送门:https://github.com/azheng51714/MACProject 这是使用 Objective-C 整理的一套 iOS 轻量级框架,内部包含大量或自己...

iOS 相册照片多选demo

  • 2017年12月05日 16:33
  • 103KB
  • 下载

MACProject,使用 Objective-C 整理的一套 iOS 轻量级框架

这是使用 Objective-C 整理的一套 iOS 轻量级框架,内部包含大量或自己整理或修改自网络的 Category 、Utils、DataManager、Macros & UIComponent...

iOS开发 -NSUserDefaults 轻量级快速存储

IOS提供了一个轻量级的快速数据存储方式:NSUserDefaults; 程序运行的时候从用户默认的数据库中读取程序的设置,同时NSUserDefaults的缓存避免了在每次读取数据时候都打开用户默...

iOS 横屏打开相册例子

  • 2015年12月24日 16:17
  • 36KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:比 320要轻量级的相册 (ios)
举报原因:
原因补充:

(最多只允许输入30个字)