1

I want to display a image ,which is displayed in an ImageView, in fullscreensize if the user touches a button or the image itself. Is there a way to do this? I've seen similar on Facebook application. I want to display the image size the screen in portrait mode and when the orientation was changed in landscape mode I want that the image fits the screen. Is there a way to do this maybe a sample code? And how can the user exit the fullscreen mode? Maybe this is possible with a subvie, but I dont know how to treat that.

Here is what I mean:

Portrait mode:

enter image description here

Landscape mode: enter image description here

And the close Button. The comment section is not needed. enter image description here

I would be happy if someone could help me with this.

Best regards.

MasterRazer
  • 1,377
  • 3
  • 16
  • 40

2 Answers2

1

The description you gave it is similar to the photo gallery app in the iOS, which has zoom scroll and many more functions.

Check out this open source sample.

Created by Michael Waterfall, which includes photo gallery from images stored on server or locally.

You can modify the code as per your project requirements. And it is easy to handle the images. This will suit your need.

Edit: You can handle the classes in this way, you can see in the sample code it has 2 classes MWPhotoBrowser which is a photo browser a viewController. And a MWPhoto used to represent the photo objects.

You need to maintain photos list in MWPhoto formats only, so while using you can have a tableView showing all the photos in thumbnail in grid view style and on tapping any image your code should open that image in MWPhotoBrowser means your photos array will be same same just start index you need to change.

vishy
  • 3,241
  • 1
  • 20
  • 25
  • I'm gonna take a look. Thanks for response. – MasterRazer Dec 02 '12 at 17:45
  • do you know how to handle those files? theres no example – MasterRazer Dec 02 '12 at 18:32
  • I've set up all correctly and I wanted to show the navController but if I tap the button to display the navController (the button is on a popup view) the controller appers behind the popup! Can I make it that it shows me above of all views? Here is my problem: http://stackoverflow.com/questions/13773682/subview-displays-wrong aaaand here: http://stackoverflow.com/questions/13777395/display-navigationcontroller-on-top Thanks in advance. – MasterRazer Dec 08 '12 at 17:55
  • @NoahRaissi has ur issue fixed..? is it possible to giv the sample code on which u r working..? – vishy Dec 10 '12 at 11:14
  • Well as you can see above I wrote that the controller alsways diplay in my folder and not on top on all views so I cant actually see the picture. Take a look at the questions and please say me what I'm doing wrong. Both questions are mine so you can choose which one you like to awnser. I would happy if you could say me a solution to but the navcontroller on above the popover. And it works actually I can see that it appears but it appears in my folder which I dont want to. – MasterRazer Dec 10 '12 at 14:31
0

You could use the pod XLMediaZoom to show images and videos in fullscreen like Instagram. See this answer: https://stackoverflow.com/a/18282163/1070393

Community
  • 1
  • 1
RemeR
  • 667
  • 8
  • 20