#import "YHPhotoBrowser.h"
NSMutableArray *images = [NSMutableArray array];
for (NSInteger i = 0; i<9; i++) {
//创建 YHPhoto 对象
YHPhoto *photo = [[YHPhoto alloc] init];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://icgdb.oss-cn-shanghai.aliyuncs.com/testByCui/yh%02zd.jpg", i+1]];
//大图的url
photo.url = url;
//起始的imageView数组
photo.srcImageView = self.imageViews[i];
[images addObject:photo];
}
//设置图片浏览器
YHPhotoBrowser *browser = [[YHPhotoBrowser alloc] init];
browser.photos = images;
//当前点击的imageView的索引,即第几个imageView
browser.currentIndex = indexPath.item;
//弹出browser
[browser showWithPresentingVc:self];