Open tc976562936 opened 1 year ago
选择相册里的gif图作为水印图片,EFImage为normal成了普通照片
在从相册里选择照片的didFinishPickingMediaWithInfo回调方法里, if let imageUrl = info[.referenceURL] as? URL, let asset = PHAsset.fetchAssets(withALAssetURLs: [imageUrl], options: nil).lastObject { images = selectedAlbumPhotosIncludingGifWithPHAssets(assets: [asset]) } asset为nil,images的count为0,导致不走底下的方法 if let tryGIF = images.first(where: { $0.value?.isGIF == true }) { watermark = tryGIF.value! }
xcode14.1 ios16.1.1 Swift5 EFQRCode6.2.1
检查清单
问题描述
选择相册里的gif图作为水印图片,EFImage为normal成了普通照片
展开讲讲
在从相册里选择照片的didFinishPickingMediaWithInfo回调方法里, if let imageUrl = info[.referenceURL] as? URL, let asset = PHAsset.fetchAssets(withALAssetURLs: [imageUrl], options: nil).lastObject { images = selectedAlbumPhotosIncludingGifWithPHAssets(assets: [asset]) } asset为nil,images的count为0,导致不走底下的方法 if let tryGIF = images.first(where: { $0.value?.isGIF == true }) { watermark = tryGIF.value! }
重现步骤
xcode14.1 ios16.1.1 Swift5 EFQRCode6.2.1
其他信息