测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可 | MIT |
发布最后发布 | 2017年1月 |
由 Scott Corscadden 维护。
支持多选功能的 UIImagePickerController 副本。
QBImagePickerController 在 CocoaPods 上可用。
pod 'QBImagePickerController'
如果想要手动安装,下载此仓库并将 QBImagePickerController 目录中的文件复制到您的项目中,然后链接 AssetsLibrary.framework
。
if (![QBImagePickerController isAccessible]) {
NSLog(@"Error: Source is not accessible.");
}
QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsMultipleSelection = YES;
QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsMultipleSelection = YES;
imagePickerController.minimumNumberOfSelection = 3;
imagePickerController.maximumNumberOfSelection = 6;
QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.groupTypes = @[
@(ALAssetsGroupSavedPhotos),
@(ALAssetsGroupPhotoStream),
@(ALAssetsGroupAlbum)
];
相册的顺序将与 groupTypes
数组中指定的相同。
QBImagePickerController 不是 UINavigationController 的子类。
如果您想将以模态视图的形式显示选择器,您必须将选择器设置为 UINavigationController 实例的 topViewController
属性。
如果您想将选择器推送到 UINavigationController,您不需要做任何事情。
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:imagePickerController];
[self presentViewController:navigationController animated:YES completion:NULL];
QBImagePickerController 根据 MIT 许可证 发布,请参阅 LICENSE.txt。