1.效果图

YHPinchPhotoBrowser.gif
2.使用方法
// 导入头文件
#import "UIViewController+YHPinchPhotoBrowser.h"
__weak typeof(self) weakSelf = self;
self.yhPhotoBrowser.bz_dataSource = ^(UIPinchGestureRecognizer * _Nonnull recognizer, LocationInTarget _Nonnull locationInTarget) {
if (locationInTarget) {
locationInTarget(weakSelf.sinleImageView);
}
};
__weak typeof(self) weakSelf = self;
self.yhPhotoBrowser.bz_dataSource = ^(UIPinchGestureRecognizer * _Nonnull recognizer, LocationInTarget _Nonnull locationInTarget) {
[weakSelf locationInImageView:recognizer locationInTarget:locationInTarget];
};
- (void)locationInImageView:(UIPinchGestureRecognizer*)recognizer
locationInTarget:(LocationInTarget)locationInTarget {
CGPoint locationTable = [recognizer locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:locationTable];
YHImageTableViewCell *targetCell = (YHImageTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath];
UIImageView *imgeView = [targetCell getCurrentImageView];
if (locationInTarget) {
locationInTarget(imgeView);
}
}
网友评论