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

调试高斯模糊

parent 17f34b80
...@@ -79,6 +79,7 @@ target 'galaxy' do ...@@ -79,6 +79,7 @@ target 'galaxy' do
pod 'WechatOpenSDK', '2.0.2' pod 'WechatOpenSDK', '2.0.2'
#视频播放器 #视频播放器
pod 'BMPlayer', '1.3.0' pod 'BMPlayer', '1.3.0'
#高斯模糊
pod 'VisualEffectView', '4.1.5' pod 'VisualEffectView', '4.1.5'
end end
......
...@@ -46,6 +46,7 @@ class YHHomeBannerCollectionViewCell: FSPagerViewCell { ...@@ -46,6 +46,7 @@ class YHHomeBannerCollectionViewCell: FSPagerViewCell {
updateUI() updateUI()
} }
} }
let visualEffectView = VisualEffectView()
} }
private extension YHHomeBannerCollectionViewCell { private extension YHHomeBannerCollectionViewCell {
...@@ -56,10 +57,8 @@ private extension YHHomeBannerCollectionViewCell { ...@@ -56,10 +57,8 @@ private extension YHHomeBannerCollectionViewCell {
make.edges.equalToSuperview() make.edges.equalToSuperview()
} }
let visualEffectView = VisualEffectView()
// Configure the view with tint color, blur radius, etc // Configure the view with tint color, blur radius, etc
visualEffectView.colorTint = UIColor(hex: 0xffffff) visualEffectView.colorTint = UIColor(hex: 0xAFAFAF).withAlphaComponent(0.15)
visualEffectView.colorTintAlpha = 0.08
visualEffectView.blurRadius = 16 visualEffectView.blurRadius = 16
visualEffectView.scale = 1 visualEffectView.scale = 1
contentView.addSubview(visualEffectView) contentView.addSubview(visualEffectView)
...@@ -82,12 +81,12 @@ private extension YHHomeBannerCollectionViewCell { ...@@ -82,12 +81,12 @@ private extension YHHomeBannerCollectionViewCell {
if model.isLocalItemFlag { if model.isLocalItemFlag {
bannerTitleLable.isHidden = true bannerTitleLable.isHidden = true
// effectV.isHidden = true visualEffectView.isHidden = true
bannerImagV.image = UIImage(named: model.img_url) bannerImagV.image = UIImage(named: model.img_url)
} else { } else {
bannerTitleLable.isHidden = false bannerTitleLable.isHidden = false
// effectV.isHidden = false visualEffectView.isHidden = false
if let url = URL(string: model.img_url) { if let url = URL(string: model.img_url) {
bannerImagV.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image")) 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