-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
关键代码如下
...................
let asset = assets[startIndex]
let photo = GKPhoto()
photo.isLivePhoto = false
photo.imageAsset = asset
.................
let configure = GKPhotoBrowserConfigure.default()
configure.showStyle = .zoom // 缩放显示
configure.hideStyle = .zoomScale // 缩放隐藏
configure.loadStyle = .indeterminate // 加载样式:不使用遮罩,保持可交互
configure.maxZoomScale = 3.0 // 最大缩放比例
configure.doubleZoomScale = 2.0 // 双击缩放比例
configure.hidesCountLabel = true // 隐藏计数标签(只显示一张)
configure.hidesSavedBtn = true // 隐藏保存按钮
configure.isFullWidthForLandScape = false // 横屏不全宽
configure.isSingleTapDisabled = false // 启用单击手势
configure.isShowLivePhotoMark = false // 显示 Live Photo 标记
configure.isClearMemoryForLivePhoto = false // 不清理 Live Photo 内存
configure.isVideoReplay = true // 视频循环播放(如果有视频)
let browser = GKPhotoBrowser(photos: [photo], currentIndex: 0)
browser.configure = configure // 设置配置
browser.show(fromVC: self)表现
进入界面之后,会有一个模糊图占位。高清图应该在加载过程中。此时界面无法单击或者拖拽退出。
预期
iCloud 图片加载过程中也可以正常退出界面。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels