SDPhotoBrowser
SDPhotoBrowser copied to clipboard
显示图片是压缩的问题
- (void)setPhotoItemArray:(NSArray *)photoItemArray 这个方法中 如果设置 btn.imageView.contentMode = UIViewContentModeScaleAspectFill; 按钮显示的图片模式是等比例的伸缩 这样 点击浏览的图片 消失的时候 CGRect targetTemp = [self.sourceImagesContainerView convertRect:sourceView.frame toView:self]; 效果是 图片位置有晃一下的效果 原因是 targetTemp的尺寸和 默认的尺寸不一致 就会有个位置错乱的动画
解决方案 1.函数 setPhotoItemArray:(NSArray *)photoItemArray 添加图片按钮 btn.imageView.contentMode = UIViewContentModeScaleAspectFill; 2.在函数photoClick:(UITapGestureRecognizer *)recognizer中 UIImageView *tempView = [[UIImageView alloc] init]; tempView.contentMode = UIViewContentModeScaleAspectFill; tempView.clipsToBounds = YES;
tempView.contentMode = sourceView.contentMode; tempView.clipsToBounds = YES;
添加这两行代码试下,库里也已经做了更新
貌似还是会有闪一下的效果啊, 该怎样解决??