New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能否打开指定相册 #647
Comments
HXPhotoPicker/Sources/HXPhotoPicker/Picker/Protocol/Fetch/PhotoFetchAssetCollection.swift Lines 45 to 50 in 6d066bf
config.fetchAssetCollection = TestPhotoFetchAssetCollection.self
public struct TestPhotoFetchAssetCollection: PhotoFetchAssetCollection {
public static func fetchCameraAssetCollection(_ config: PickerConfiguration, options: PHFetchOptions) -> PhotoAssetCollection? {
if /*自定义默认显示的相册*/ {
if config.creationDate {
options.sortDescriptors = [
NSSortDescriptor(
key: "creationDate",
ascending: config.creationDate
)
]
}
var collection: PhotoAssetCollection?
fetchAssetCollections(options: options) { assetCollection, isCameraRoll, stop in
if !isCameraRoll {
collection = assetCollection
stop.pointee = true
}
}
if let collection {
return collection
}
}
return DefaultPhotoFetchAssetCollection.fetchCameraAssetCollection(config, options: options)
}
} |
你好, 按照上边的方式实现了, 我们采用albumShowMode方式为popup,有点小问题, 比如自定义相册为'xxx', 弹出后点击上边的标题展示albumList会发现显示的是'xxx',但是列表选中的却是'最近项目', 切换几次后'最近项目'又不见被替换为'xxx'了,这时列表里有2个'xxx'相册, 虽然可以修改自定义相册
|
这个问题下个版本会修改,不会替换掉第一个相册 |
试了最新的修改代码后相册已经不会被替换掉了, 然而发现有一个bug: https://github.com/SilenceLove/HXPhotoPicker/assets/12481783/927e7131-99b0-4a49-bbb0-dc5862c44434
|
最新的代码试试 |
有一个需求,传入指定的相册名称,打开默认选中的是对应的相册浏览,看了下api貌似并没有对应参数,能否支持下?
The text was updated successfully, but these errors were encountered: