Issue
Hello Developer I want to create a a directory inside a Album in iOS using Xamarin form ,I need to use this directory to store all my capture images
Solution
You can use PhotoLibrary to manage picture in album.
We can use it through dependencyService in Xamarin.Forms.
Here is a document about it https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introduction
I also create a simple test about creating album in ios:
IOS implement code:
[assembly:Dependency(typeof(CreateAlbumService))]
namespace My_Forms_Test3.iOS
{
public class CreateAlbumService : ICreateAlbumService
{
public void CreateAlbum()
{
PHPhotoLibrary.SharedPhotoLibrary.PerformChanges(() => { PHAssetCollectionChangeRequest.CreateAssetCollection("TestAlbum"); },(issuccess,error)=> { if (!issuccess) Console.WriteLine(error); });
}
}
}
result:
Answered By - Adrain Zhu -MSFT

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.