views:

263

answers:

2

Can someone please tell me how to get a full screen image preview view when someone taps on an image view of a nib... like the one in appstore application screenshots.... it will be a real help... Thanks in advance

+3  A: 

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.

Jasarien
THANKS A MILLION
valiantb
No problem, here to help.If you think this solved your problem, would you consider marking it as the chosen answer? This will help others with the same problem in finding an answer quickly.Thanks!
Jasarien
A: 

I actually wanted a control like the image preview in photos and that on facebook maybe.... which i found in the open source three20 repository... google it to find out ....

valiantb