'How to antialiasing with UIVisualEffectView in swift?
I made an Blur View. And that rotated. Then pixel broken.
This is my code.
extension UIView {
func addBlur() {
let effect = UIBlurEffect(style: .regular)
let effectView = UIVisualEffectView(effect: effect)
effectView.frame = bounds
effectView.layer.allowsEdgeAntialiasing = true
effectView.layer.masksToBounds = true
effectView.layer.allowsEdgeAntialiasing = true
insertSubview(effectView, at: 0)
backgroundColor = .clear
layer.allowsEdgeAntialiasing = true
layer.masksToBounds = true
}
func rotate(angle: CGFloat) {
let radians = angle / 180.0 * CGFloat.pi
let rotation = transform.rotated(by: radians)
transform = rotation
}
}
How can I fix it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

