O'Reilly logo

Xamarin Blueprints by Michael Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The ALAssetLibrary

Jumping back into our iOS, we are going to use the ALAssetsLibrary class and call the Enumerate function by passing in the group type ALAssetsGroupType.SavedPhoto, the enumeration result delegate GroupEnumerator, and the error action that will be performed if an exception occurs.

Start by adding in a new .cs file for our iOS image handler:

Note

We are not going to use a static class with this object.

namespace Gallery.iOS { using System; using System.Threading; using UIKit; using AssetsLibrary; using Foundation; /// <summary> /// Image handler. /// </summary> public class ImageHandler { /// <summary> /// The asset library. /// </summary> ALAssetsLibrary _assetLibrary; /// <summary> /// Initializes a new instance of the <see cref="Gallery.iOS.ImageHandler"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required