Commit 20c65868 authored by David黄金龙's avatar David黄金龙

调试高斯模糊

parent 17f34b80
......@@ -79,6 +79,7 @@ target 'galaxy' do
pod 'WechatOpenSDK', '2.0.2'
#视频播放器
pod 'BMPlayer', '1.3.0'
#高斯模糊
pod 'VisualEffectView', '4.1.5'
end
......
......@@ -46,6 +46,7 @@ class YHHomeBannerCollectionViewCell: FSPagerViewCell {
updateUI()
}
}
let visualEffectView = VisualEffectView()
}
private extension YHHomeBannerCollectionViewCell {
......@@ -56,10 +57,8 @@ private extension YHHomeBannerCollectionViewCell {
make.edges.equalToSuperview()
}
let visualEffectView = VisualEffectView()
// Configure the view with tint color, blur radius, etc
visualEffectView.colorTint = UIColor(hex: 0xffffff)
visualEffectView.colorTintAlpha = 0.08
visualEffectView.colorTint = UIColor(hex: 0xAFAFAF).withAlphaComponent(0.15)
visualEffectView.blurRadius = 16
visualEffectView.scale = 1
contentView.addSubview(visualEffectView)
......@@ -82,12 +81,12 @@ private extension YHHomeBannerCollectionViewCell {
if model.isLocalItemFlag {
bannerTitleLable.isHidden = true
// effectV.isHidden = true
visualEffectView.isHidden = true
bannerImagV.image = UIImage(named: model.img_url)
} else {
bannerTitleLable.isHidden = false
// effectV.isHidden = false
visualEffectView.isHidden = false
if let url = URL(string: model.img_url) {
bannerImagV.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment