图片操作
1 保存部分:
addAssetsGroupAlbumWithName:resultBlock:failureBlock:
Adds a new assets group to the library.
Parameters
- name
-
The name for the new group.
If name conflicts with another assets group with the same name, then the group is not created and resultBlock returns a
nil
group. - resultBlock
-
The block invoked after the add operation completes.
For a description of the block, see
ALAssetsLibraryAccessFailureBlock
. - failureBlock
-
The block to invoke if the add operation fails—for example, if the user denies access to the application.
For a description of the block, see
ALAssetsGroupFaces
.
Discussion
The name of the new asset group is name, its type is ALAssetsGroupAlbum
, and the editable
property is YES
.
This method is asynchronous. When the assets group is added, the user may be asked to confirm the application’s access to the data; the method, though, returns immediately. You should perform whatever work you want with the group in resultBlock.
If the user denies access to the application, or if no application is allowed to access the data, or if the data is currently unavailable, the failure block is called.
Availability
- Available in iOS 5.0 and later.
Declared In
ALAssetsLibrary.h
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步