我们在很多软件都会看到图片浏览很炫酷吊炸天。今天给推荐一个好用的图片浏览sdk。名叫:JTSImageViewController
直接cocopod就好,别去拖入什么的,麻烦到爆。
pod 'JTSImageViewController'
记得:pod install 哦
使用:
1.头文件别忘了
#import <JTSImageViewController/JTSImageViewController.h>
2.
JTSImageInfo *imageInfo = [[JTSImageInfo alloc] init];
UIImageView *imageView = [[UIImageView alloc] init];
[imageView sd_setImageWithURL:self.imageURL];
imageInfo.image = imageView.image;
imageInfo.referenceRect = self.imageView.frame;
imageInfo.referenceView = self.imageView.superview;
JTSImageViewController *imageViewController = [[JTSImageViewController alloc] initWithImageInfo:imageInfo mode:JTSImageViewControllerMode_Image backgroundStyle:JTSImageViewControllerBackgroundOption_Scaled];
[imageViewController showFromViewController:self transition:JTSImageViewControllerTransition_FromOriginalPosition];
下面是效果图