一个很好用的图片查看类:JTSImageViewController

我们在很多软件都会看到图片浏览很炫酷吊炸天。今天给推荐一个好用的图片浏览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];

下面是效果图
点击弹出的效果
拖动时的效果
不同方向的拖动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值