0
正如你可以看到下面的圖像,我想創建模糊視圖與漸變邊緣效果。有人寫我如何在iOS中實現這個代碼?模糊視圖與淡入邊緣效果 - iOS
感謝
please take a look at this image - marked in red rectangle
正如你可以看到下面的圖像,我想創建模糊視圖與漸變邊緣效果。有人寫我如何在iOS中實現這個代碼?模糊視圖與淡入邊緣效果 - iOS
感謝
please take a look at this image - marked in red rectangle
let blurEffect = UIBlurEffect(style: .Light)
let imageView = UIImageView(image: UIImage(named:))//your ImageView
let visualEffectView = UIVisualEffectView(effect: blurEffect)
imageView.addSubview(visualEffectView)
您可能需要改變visualEffectView的框架來覆蓋你的形象,但是,這是它的基本功能。
你嘗試過什麼嗎?請說明你迄今爲止做了什麼。 –
Stack不是一個請求代碼的地方,它是人們幫助您解決編碼問題的地方。我在這個問題上看不到任何代碼。 –