ios - swift中animateWithDuration的使用问题
高洛峰
高洛峰 2017-04-17 18:00:48
0
2
298

写了一个用于放大照片的类,点击照片后有一个放大的动画效果,代码如下:

现在出现了一个问题,那就是,当我调用这个放大类以后,动画展示backgroundView出来的一瞬间又消失了,我在这段代码下面的部分写了控制消失的手势,就是tap那里,但是需要一个手势才会消失,断点查看并没有通过这段控制消失的代码,那么现在这个动画后backgroundView出现瞬间消失的问题是出在哪里呢?

这里是我正常工作的oc代码:

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
巴扎黑

Are you using Auto Layout?

Ty80

Off topic, if you use constraints for layout, and then you want to modify the position of the view for animation
You can modify the value of the constraint in the block instead of modifying the value of the frame

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template