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"/> ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.