Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Photo/Image Viewer for Monotouch [closed]

I've googled a bit but could not find a simple Image Viewer class to use in my MonoTouch app.

I don't need to show image thumbnails neither a complete photo album (with multiple photos).

I just need an image viewer to show an UIImageView, allowing the common fullscreen/zoom operations.

Obviously such viewer could be implemented using a UIViewController subclass with UIGestureRecognizer, UIScrollView and UINavigationBar trickery, but I don't want to reinvent the wheel. Does anyone know about an open source component available ?

It would also be useful to host such component in the new Xamarin Component Store

Thanks

like image 655
Eduardo Coelho Avatar asked Mar 02 '13 22:03

Eduardo Coelho


People also ask

How do I open default image viewer?

To do this, open the Control Panel and go to Default Programs > Set Default Programs. Find Windows Photo Viewer in the list of programs, click it and choose Set this program as default. This will set the Windows Photo Viewer as the default program for all file types it can open by default.

How do I open an image in photo viewer?

You can open the Image Viewer app from the Apps tab, under Image Processing and Computer Vision. To bring image data into Image Viewer from a file name, select Open from the File menu.


1 Answers

Here it is.

Features:

  • Show both big images (larger than the screen) and small ones;
  • One tap to close view, two taps to zoom in/out. Pinch to zoom is also available;
  • Scrolling through available content. It's impossible to scroll image outside visible area. Thanks to UIScrollView's ContentSize property.

Suggestions for future:

  • I reduced code by removing UINavigationBar usage.
  • Also it's nice to add UIView's basic animation (fade in/out) when user opens/closes full screen image view.

Some relative info:

  • Solution was strongly inspired by this article.
  • As a starting point for patching I recommend Xamarin's article.

Any bug reports and suggestions are welcome!

like image 95
Maxim Korobov Avatar answered Sep 17 '22 12:09

Maxim Korobov