扫码关注官方订阅号
微博iOS客户端,单条微博中图片点击后放大的效果如何实现?
1. tableview 中加入UITapGestureRecognizer, 2. tap的时候,得知道你的tap-point是在图片上,(cell-view需要加入一些逻辑去保存图片的frame),假设这时候的cell中的image的frame为imageframe. 3. 如果是在图片上,那么,自己写一个uiview, 其中包含了一个ui-image-view, create这个uiview,期初始view.frame = imageframe. 4. 把这个uiview 加入到当前self.view(or self.view.window)中,bringtofront, 5. 做一个animation, 把3中create的view的frame设置成self.view.frame(or self.view.window.frame)。
http://www.cocoachina.com/bbs/read.ph...
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
1. tableview 中加入UITapGestureRecognizer,
2. tap的时候,得知道你的tap-point是在图片上,(cell-view需要加入一些逻辑去保存图片的frame),假设这时候的cell中的image的frame为imageframe.
3. 如果是在图片上,那么,自己写一个uiview, 其中包含了一个ui-image-view, create这个uiview,期初始view.frame = imageframe.
4. 把这个uiview 加入到当前self.view(or self.view.window)中,bringtofront,
5. 做一个animation, 把3中create的view的frame设置成self.view.frame(or self.view.window.frame)。
http://www.cocoachina.com/bbs/read.ph...