'How To create a folder inside a Album in iOS iPhone Using Xamarin form
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 1:[1]
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:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Adrain Zhu -MSFT |