|
@@ -120,7 +120,21 @@ extension WSSImagePickerController {
|
|
|
}
|
|
|
|
|
|
assetCellDidLayoutSubviewsBlock = { [weak self] cell, _, _, _, bottomView, _, videoImageView in
|
|
|
+ guard let cellModel = cell?.model else { return }
|
|
|
+ let isImageType = cellModel.type.rawValue == 0
|
|
|
videoImageView?.isHidden = true
|
|
|
+ bottomView?.isHidden = isImageType // 图片默认隐藏,视频的话默认显示
|
|
|
+
|
|
|
+ if let phAsset = cellModel.asset {
|
|
|
+ let resourceArray = PHAssetResource.assetResources(for: phAsset)
|
|
|
+ if let hasLocalResource = resourceArray.first?.value(forKey: "locallyAvailable") as? Bool {
|
|
|
+ if !hasLocalResource {
|
|
|
+ videoImageView?.image = R.image.template_album_icloud()
|
|
|
+ videoImageView?.isHidden = false
|
|
|
+ bottomView?.isHidden = false /// PS: 无论是图片还是视频,都需要显示,而bottomView 也需要显示
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
bottomView?.backgroundColor = UIColor.clear
|
|
|
bottomView?.layer.contents = R.image.video_shadow()?.cgImage
|
|
|
|
|
@@ -266,7 +280,7 @@ extension WSSImagePickerController {
|
|
|
tipLabel.backgroundColor = OJSColor(hexRGBValue: 0x292935)
|
|
|
tipLabel.text = "请选择有人物动作的视频"
|
|
|
tipLabel.textAlignment = .center
|
|
|
- tipLabel.textColor = OJSColor(hexRGBValue: 0xcccccc)
|
|
|
+ tipLabel.textColor = OJSColor(hexRGBValue: 0xCCCCCC)
|
|
|
tipLabel.font = OJAFont.font14
|
|
|
tipLabel.tag = 2001
|
|
|
return tipLabel
|