如何在相机胶卷的特定位置插入新创建的 PHAsset?

How to insert a newly created PHAsset at a specific position in camera roll?

是否可以在相机胶卷中的指定索引处插入新的 PHAsset?

我试过以下方法:

let cam_req = PHAssetCollectionChangeRequest(for: camera_roll)
cam_req?.insertAssets([asset] as NSArray, at: IndexSet(integer: pos))

无效。

http://www.tapsmart.com/tips-and-tricks/album-order-reordering-photos-album-ios-12-guide/

It’s important to note that this only works for custom photo albums you’ve created yourself – default albums like “All Photos” and “Favorites” are arranged chronologically and can’t be rearranged this way.

那么手动更改“所有照片”和“收藏夹”的顺序是不可能的 - API 级别也应该受到限制。

相册就像一堆东西。它按导入日期排序。无法更改顺序或在特定位置插入 photo/video。如果你想这样做,你必须创建一个自定义用户相册。自定义用户相册包含对相机胶卷中原件的引用,可以重新排序。