简体   繁体   English

如何在Facebook iphone应用程序中全屏打开图像?

[英]How to open image in full screen like facebook iphone app?

I'm new in ios development and i want to open images in fullscreen mode like facebook iphone app , also I want the event which let you drag image to down and then open the image in fullscreen mode. 我是ios开发的新手,我想在全屏模式下打开图像,比如facebook iphone app,我也希望这个事件能让你将图像向下拖动,然后以全屏模式打开图像。 So anyone can help men ? 所以任何人都可以帮助男人

You could use this pod: XLMediaZoom. 你可以使用这个pod:XLMediaZoom。 We recently developed it for our needs and shared here: XLMediaZoom 我们最近根据我们的需求开发了它并在此分享: XLMediaZoom

If you use CocoaPods in your projects you just need to add 如果您在项目中使用CocoaPods,则只需添加

pod 'XLMediaZoom'

This utility let you preview images and videos in fullscreen like Instagram does. 此实用程序可让您像Instagram一样全屏预览图像和视频。

To open image in full screen try this : 要全屏打开图像,请尝试以下操作:

self.imageView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);

To let the user drag the image use UIPanGestureRecognizer . 要让用户拖动图像,请使用UIPanGestureRecognizer

To look at examples of UIPanGestureRecognizer refer to this . 要查看UIPanGestureRecognizer的示例,请参阅此内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM