简体   繁体   中英

Full Screen Image Preview

有人可以告诉我如何在有人点击笔尖的图像视图时获得全屏图像预览视图吗...就像appstore应用程序屏幕截图中的那个一样。...这将是真正的帮助...在此先感谢

The first thing you need to do is subclass UIImageView.

Then in your subclass make sure that user interaction is enabled (either by setting it in code, or by checking the box in IB).

Then you need to override the touches:DidBeginWithEvent: (et al) methods (they're found in UIResponder), and put the code for what you want to happen inside them. For example, you could create a larger image view, and then attach it to the view hierarchy.

As for making it completely fullscreen, you'd need to set the frame of the image view to that of the Window, and hide any Tab Bars, Navigation Bars, Status bars, etc.

You can hide the status bar by using

[[UIApplication sharedApplication] setStatusBarHidde:YES];

Hide navigation bars:

[navigationController setNavigationBarHidden:YES];

so on and so forth. You should be able to find ways to hide most things by looking at their docs.

Hope this helps.

我实际上想要一个控件,例如照片中的图像预览以及在Facebook上的图像预览...。我在开源Three20存储库中找到了该控件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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