We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好!第一次点击小图弹出正常,点击图片dismiss之后再次点击小图,小图也会出现在屏幕上,点击大图使其dismiss没有了动画效果。 代码如下: `_taskImgThumbnail = [[UIImageView alloc] init]; //先截取原图正方形图片,再转化为200宽缩略图,转化为50的话图片模糊 _taskImgThumbnail.image = [self thumbnailWithImage:[self thumbnailCenterImage:[UIImage imageNamed:@"IMG_0065"] centerInSize:CGSizeMake([UIImage imageNamed:@"IMG_0065"].size.width, [UIImage imageNamed:@"IMG_0065"].size.width)] size:CGSizeMake(200,200)]; [self.view addSubview:_taskImgThumbnail]; [_taskImgThumbnail mas_makeConstraints:^(MASConstraintMaker make) { make.centerX.equalTo(taskImgTip); make.top.equalTo(taskImgTip.bottom).offset(7WIDTHRATE); make.size.equalTo(CGSizeMake(50WIDTHRATE, 50WIDTHRATE)); }];
_tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(taskImgTapEvent:)]; _tap.delegate = self; _taskImgThumbnail.userInteractionEnabled = YES; [_taskImgThumbnail addGestureRecognizer:_tap]; _picBrowser = [[ESPictureBrowser alloc] init]; _picBrowser.delegate = self;
#pragma mark -- 点击手势触发的事件
#pragma mark - 图片查看
(UIView *)pictureView:(ESPictureBrowser )pictureBrowser viewForIndex:(NSInteger)index { return _taskImgThumbnail; } /
(CGSize)pictureView:(ESPictureBrowser )pictureBrowser imageSizeForIndex:(NSInteger)index { return CGSizeMake(DEVICEWIDTH, DEVICEHEIGHT); }/
(UIImage *)pictureView:(ESPictureBrowser *)pictureBrowser defaultImageForIndex:(NSInteger)index { return [UIImage imageNamed:@"pic01"]; }
(NSString *)pictureView:(ESPictureBrowser *)pictureBrowser highQualityUrlStringForIndex:(NSInteger)index { return @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1490603248787&di=34c3c9dbbfc54f7f004977c5ae716b3e&imgtype=0&src=http%3A%2F%2Fbbs.crsky.com%2F1236983883%2FMon_1208%2F25_187069_d3846bd52f4f0fa.jpg"; }`
初始界面
第一次点击小图弹出
第二次点击小图弹出
滑动dismiss时
滑动dismiss后再弹出
The text was updated successfully, but these errors were encountered:
No branches or pull requests
您好!第一次点击小图弹出正常,点击图片dismiss之后再次点击小图,小图也会出现在屏幕上,点击大图使其dismiss没有了动画效果。
代码如下:
`_taskImgThumbnail = [[UIImageView alloc] init];
//先截取原图正方形图片,再转化为200宽缩略图,转化为50的话图片模糊
_taskImgThumbnail.image = [self thumbnailWithImage:[self thumbnailCenterImage:[UIImage imageNamed:@"IMG_0065"] centerInSize:CGSizeMake([UIImage imageNamed:@"IMG_0065"].size.width, [UIImage imageNamed:@"IMG_0065"].size.width)] size:CGSizeMake(200,200)];
[self.view addSubview:_taskImgThumbnail];
[_taskImgThumbnail mas_makeConstraints:^(MASConstraintMaker make) {
make.centerX.equalTo(taskImgTip);
make.top.equalTo(taskImgTip.bottom).offset(7WIDTHRATE);
make.size.equalTo(CGSizeMake(50WIDTHRATE, 50WIDTHRATE));
}];
#pragma mark -- 点击手势触发的事件
NSLog(@"dianji");
[_picBrowser showFromView:_taskImgThumbnail picturesCount:1 currentPictureIndex:0];
}
#pragma mark - 图片查看
(UIView *)pictureView:(ESPictureBrowser )pictureBrowser viewForIndex:(NSInteger)index {
return _taskImgThumbnail;
}
/
(CGSize)pictureView:(ESPictureBrowser )pictureBrowser imageSizeForIndex:(NSInteger)index {
return CGSizeMake(DEVICEWIDTH, DEVICEHEIGHT);
}/
(UIImage *)pictureView:(ESPictureBrowser *)pictureBrowser defaultImageForIndex:(NSInteger)index {
return [UIImage imageNamed:@"pic01"];
}
(NSString *)pictureView:(ESPictureBrowser *)pictureBrowser highQualityUrlStringForIndex:(NSInteger)index {
return @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1490603248787&di=34c3c9dbbfc54f7f004977c5ae716b3e&imgtype=0&src=http%3A%2F%2Fbbs.crsky.com%2F1236983883%2FMon_1208%2F25_187069_d3846bd52f4f0fa.jpg";
}`
初始界面
第一次点击小图弹出
第二次点击小图弹出
滑动dismiss时
滑动dismiss后再弹出
The text was updated successfully, but these errors were encountered: