AGPhotoBrowser 好用的圖片瀏覽器git
https://github.com/andreagiavatto/AGPhotoBrowsergithub
A photo browser for iOS6 and iOS7 inspired by Facebook.瀏覽器
一個iOS6和iOS7的圖片瀏覽器,靈感來自於Facebook。ide
Demo project included.spa
It currently supports:code
他目前支持:component
The suggested way to install the component is using CocoaPods, just include the following line in your Podfile to get the latest version: pod "AGPhotoBrowser"
orm
推薦使用CocoaPods安裝。對象
There is a demo project included that shows how to use the photo browser.blog
這個demo中已經像你展現如何使用這個圖片瀏覽器了。
AGPhotoBrowserView.h
in your classAGPhotoBrowserView
and set the delegate and the dataSource to your class- (NSInteger)numberOfPhotosForPhotoBrowser:(AGPhotoBrowserView *)photoBrowser
and - (UIImage *)photoBrowser:(AGPhotoBrowserView *)photoBrowser imageAtIndex:(NSInteger)index
methods from the datasource- (NSString *)photoBrowser:(AGPhotoBrowserView *)photoBrowser titleForImageAtIndex:(NSInteger)index
and - (NSString *)photoBrowser:(AGPhotoBrowserView *)photoBrowser descriptionForImageAtIndex:(NSInteger)index
- (void)show
or - (void)showFromIndex:(NSInteger)initialIndex
methods- (void)hideWithCompletion:( void (^) (BOOL finished) )completionBlock