【发布时间】:2016-07-05 09:36:41
【问题描述】:
我尝试了很多,但没有得到任何解决方案。我已经推荐了https://github.com/xmartlabs/XLMediaZoom。
【问题讨论】:
-
你是如何使用这个库的?从 github 下载 zip 并在您的项目中运行或实现 pod?
标签: objective-c animation uiview
我尝试了很多,但没有得到任何解决方案。我已经推荐了https://github.com/xmartlabs/XLMediaZoom。
【问题讨论】:
标签: objective-c animation uiview
在第三方库方面,https://www.cocoacontrols.com/controls/vertigo 似乎做你想做的事?您可以在 https://www.cocoacontrols.com/ 上查看其他人,例如 https://www.cocoacontrols.com/controls/exphotoviewer。
如果您想自己实现这一点,您可以查看在 iOS 7 中成为可能的自定义转换,例如当你点击一个 UIView 时,你会转换到一个 UIViewController ,它用图像覆盖全屏。
实际上,话虽如此,您可以只为 UIView 设置动画以覆盖全屏:p,
[UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
// (flag) ? set frame fullscreen : set frame normal
// or even better create and modify constraints with Masonry
// https://github.com/SnapKit/Masonry :)
}];
【讨论】: