silencelove / hxphpicker Goto Github PK
View Code? Open in Web Editor NEWPhoto/Video Selector-Supports LivePhoto, GIF selection, online download of resources on iCloud, and editing of photos/videos
License: MIT License
Photo/Video Selector-Supports LivePhoto, GIF selection, online download of resources on iCloud, and editing of photos/videos
License: MIT License
不是编辑,而是添加一段文字,用作标题展示
设置config.selectOptions = [.gifPhoto],还是会显示静态图片。
设置config.selectOptions = [.video],只显示video。
作者你好 ,我想问一下 RowTypeRule.swift 这个文件里有一个同名的接口协议 protocol RowTypeRule { ... } 和其默认实现
我想问一下 , 这个接口貌似在全局没有被用到 , 我想向你请教一下 , 这样的写法是 swift 必须得么? 还是说你也只是留一个口子在这 , 用不用无所谓 ? 希望您看到消息方便的时候回复一下 , 不胜感激!
特殊需求,需要修改一下内部的源码
作者您好 , 最近在通过您的这个开源项目学习 swift 语法也学习到了你代码中很好的 面向接口而非面向实现编程
的代码写法思路 , 有一个点想和您探讨 :
ConfigurationViewCell 这个文件中, 对控件的懒加载前面你用了 private(set)修饰, 但是其实我发现即便这样 ,我在外部还是可以通过比如 cell.titleLabel.XXX 拿到 titleLabel 内部的属性 , 还是能修改一些相关信息, 这里是不是直接用 private修饰更好 , 感觉这个 private(set)完全没起到作用, 它只是让 titleLabel 没办法再被定义被初始化 , 但是他里面的属性我还是拿得到能修改 , 这样对封装性是不是有一些破坏;
如果您看到信息, 烦请您方便的时候回复一下 , 谢谢!
config.maximumSelectedVideoDuration = 15
config.minimumSelectedVideoDuration = 5
我这样限制时间,然后可剪辑时长却只有10s
有人遇到同样的问题吗?
希望Swift也能像OC一样 直接把这个功能集成在库里面
运行报错:Command CompileSwiftSources failed with a nonzero exit code;对比了很多解决方法,仍存在问题;
视频或者图片编辑之后进行编码, 由于editedImageURL是保存到temp 文件夹的 ,重新运行App 再进行解码获取不到editedImageURL了,只显示原图
如题
咱们目前的滤镜是硬编码到代码中的,请问如何实现自定义滤镜样式,或者后期是否考虑增加动态设置滤镜参数的场景?
添加背景音乐不支持选择背景音乐的指定一段时长,后期建议添加。
如题 不管是用你的demo还是pod进项目的库
当编辑网络视频的时候 视频导出失败
是不支持编辑网络视频还是有bug?
在你的demo中我是直接在EditorConfigurationViewController控制器中修改你本地视频地址(videoURL)为网络视频地址
当视频和照片不能同时选择,并且视频最大选择数为1时,为什么隐藏了视频的选择按钮,只能点击进入详情,点击确认进行选择?而OC版的却没有隐藏选择按钮
底部实时相机预览可以关闭吗。我没有看到相关设置。
BaseViewController
我想把他变成HXBaseViewController
demo 运行报错;
let networkImageAsset = PhotoAsset.init(networkImageAsset: NetworkImageAsset.init(thumbnailURL: networkImageURL, originalURL: networkImageURL))
错误信息:Cannot find 'NetworkImageAsset' in scope
新建工程
pod 'HXPHPicker'
pod 'Kingfisher'
安装后
相同的报错原因;
分析: #if canImport(Kingfisher) 不能识别到Kingfisher 导致
作者能查看修复么?
谢谢!
虽然有暴露确认栏视图的按钮, 但是修改EditorCropConfirmView的背景色, 好像有些问题; 遍历取高度50的改成白色, 还有高斯模糊...
升级Xcode到13.3后出现Archive失败问题
这里有类似问题的讨论:longitachi/ZLPhotoBrowser#699
解决方法是替换UI_USER_INTERFACE_IDIOM()
为UIDevice.current.userInterfaceIdiom
,希望作者能修改下
This is fantastic library, do you plan to add english version of the doc?
就是当单纯选择视频的时候 并且是单选(多选我没试)
此时底部会显示 编辑、原图、完成 按钮,这时候点击完成按钮不会走代理方法
必须是点击编辑页面里面的完成按钮才会走代理方法
原因在于 PhotoPreviewContentView
在 deinit
时, photoAsset
可能已经释放掉了,deinit 时调用 cancelRequest
, 又访问了这个属性.
example 里没发现它会出现 crash, 但引入到项目后会出现此问题, 不知道是何原因
/// 获取视频地址
/// - Parameters:
/// - exportPreset: 视频分辨率,默认ratio_640x480
,传 nil 获取则是原始视频
/// - videoQuality: 视频质量[0-10],默认4,exportPreset
不为nil时有效
/// - exportSession: 导出视频时对应的 AVAssetExportSession,exportPreset不为nil时触发
/// - videoURLHandler: 每一次获取视频地址都会触发
/// - completionHandler: 全部获取完成(失败的不会添加)
func getVideoURL(
exportPreset: ExportPreset? = .ratio_640x480,
videoQuality: Int = 4,
exportSession: AVAssetExportSessionHandler? = nil,
videoURLHandler: URLHandler? = nil,
completionHandler: @escaping ([URL]) -> Void
) {
photoAssets.getVideoURL(
exportPreset: exportPreset,
videoQuality: videoQuality,
exportSession: exportSession,
videoURLHandler: videoURLHandler,
completionHandler: completionHandler
)
}
2:PickerConfiguration 和 PhotoEditorConfiguration能不能像CameraConfiguration 那样加上modalPresentationStyle的属性
每次present,相机就打开了。在iOS14下用户是能感知到的,体验不太好。
预览、原图、完成部分不能点击
PhotoBrowser浏览视频的时候,这种写法视频大小不对,只展示中间一部分
PhotoBrowser.show(
// 预览的资源数组
[PhotoAsset.init(networkVideoAsset: .init(videoURL: url))],
// 当前预览的位置
pageIndex: pageIndex,
// 预览相关配置
config: config,
// 来源控制器
fromVC: self.fromVC,
// 转场动画初始的 UIImage
transitionalImage: fromView?.image
) { index in
fromView
} deleteAssetHandler: { index, photoAsset, photoBrowser in
// 点击了删除按钮
PhotoTools.showAlert(
viewController: photoBrowser,
title: R.string.localizable.deleteCommon(preferredLanguages: Helper.currentLanguage()),
leftActionTitle: R.string.localizable.confirm(preferredLanguages: Helper.currentLanguage()),
leftHandler: { (alertAction) in
photoBrowser.deleteCurrentPreviewPhotoAsset()
self.deleteAssetHandler?(index)
}, rightActionTitle: R.string.localizable.cancel(preferredLanguages: Helper.currentLanguage())) { (alertAction) in }
} longPressHandler: { index, photoAsset, photoBrowser in
self.longPressHandler?(index)
// 长按事件
self.previewLongPressClick(
photoAsset: photoAsset,
photoBrowser: photoBrowser,
showDelete: showDelete
)
}
当我选择了一张照片 , 并且选中了原图按钮后 , 后面会显示该图片按钮的大小 , 点击完成这张图片就进入到了九宫格里 , 此时我再点击右上角的设置让系统不允许选择照片 , 点击允许加载系统照片库为 不允许 , 此时我再点击 ➕ 按钮选择照片的时候之前那张照片的原图(2.8M)还会存在, 但是其实此时照片库已经没有可选的照片了 , 希望作者看一下这个问题 ;
点击路径为:
Picker -> 打开选择器(右上角) -> 选一张且选中原图 -> 点击完成 -> 点击设置(右上角) -> 点击允许加载系统照片库将值置为不允许 -> 点击确定 -> 点击九宫格➕选择照片, 发现底部的原图(2.8M)还在 ~
1.作为图片浏览器,当预览大图滚动时,原界面的轮播图片不会滚动到当前页码,加了一个DidScrollHandler = (Int) -> Void,把内部的页码传输出去
2.有时候浏览大图时,转场动画时不想隐藏原视图,Configuration增加了个hidenSourceView的控制参数
3.当在一个Present出来的控制器中再预览大图时,转场动画会有瑕疵,底部不会渐变,动画生硬,因为PickerTransition里contentView的frame设置的有问题,当type == .present,frame = toVC.view.bounds,type == .dismiss,frame = fromVC.view.bounds
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.