框架支持限制多张图片的比率吗(同一比率)? #808
-
有个需求就是九宫格可以选择最多九张图片,选择完成后的图片必须是1:1的,在列表选择时可以选中,但是点击完成时,要校验选择的所有图,如果存在不满足比率的,要自动跳转到裁切页面,如果都满足则走完成的回调,之前OC版本我是直接修改源代码来实现,想问下作者如果现在不支持的话,最近有打算支持吗? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
或者说在点选不符合比率的图片时,会提示比率不符合,自动跳转裁切,也是可以的 |
Beta Was this translation helpful? Give feedback.
-
/// 将要选择`PhotoAsset` 不能选择时需要自己手动弹出提示框
/// - Parameters:
/// - pickerController: 对应的 PhotoPickerController
/// - photoAsset: 对应的 PhotoAsset 数据
/// - atIndex: 将要添加的索引
func pickerController(
_ pickerController: PhotoPickerController,
shouldSelectedAsset photoAsset: PhotoAsset,
atIndex: Int
) -> Bool
/// 照片列表cell点击时的指定动作
/// - Parameters:
/// - pickerController: 对应的 `PhotoPickerController`
/// - photoAsset: 对应的 `PhotoAsset` 数据
/// - index: `indexPath.item`
/// - Returns: 点击动作,如果为 nil 会根据配置的动作进行操作
func pickerController(
_ pickerController: PhotoPickerController,
cellTapAction photoAsset: PhotoAsset,
at index: Int
) -> SelectionTapAction?
看看这两个代理
微微一笑很倾城
***@***.***
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2025年6月26日(星期四) 上午10:09
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: Re: [SilenceLove/HXPhotoPicker] 框架支持限制多张图片的比率吗(同一比率)? (Discussion #808)
或者说在点击不符合比率的图片时,会提示比率不符合,自动跳转裁切,也是可以的
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
在列表可以选择(多张),在点完成时校验是否都符合比率,如果存在不符合的,跳转到预览页面,批量去裁剪,这种貌似不支持,得改源码? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
不支持这种