@sbaiahmed1/react-native-blur 4.6.1-beta.0 → 4.6.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,20 +9,20 @@ class BlurEffectView: UIVisualEffectView {
|
|
|
9
9
|
private var animator: UIViewPropertyAnimator?
|
|
10
10
|
private var blurStyle: UIBlurEffect.Style = .systemMaterial
|
|
11
11
|
private var intensity: Double = 1.0
|
|
12
|
+
private var hasConfiguredBlur = false
|
|
12
13
|
|
|
13
14
|
override init(effect: UIVisualEffect?) {
|
|
14
15
|
super.init(effect: effect)
|
|
15
|
-
setupBlur()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
required init?(coder: NSCoder) {
|
|
19
19
|
super.init(coder: coder)
|
|
20
|
-
setupBlur()
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
func updateBlur(style: UIBlurEffect.Style, intensity: Double) {
|
|
24
23
|
self.blurStyle = style
|
|
25
24
|
self.intensity = intensity
|
|
25
|
+
hasConfiguredBlur = true
|
|
26
26
|
setupBlur()
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -55,7 +55,7 @@ class BlurEffectView: UIVisualEffectView {
|
|
|
55
55
|
|
|
56
56
|
override func didMoveToWindow() {
|
|
57
57
|
super.didMoveToWindow()
|
|
58
|
-
if window != nil {
|
|
58
|
+
if window != nil && hasConfiguredBlur {
|
|
59
59
|
setupBlur()
|
|
60
60
|
}
|
|
61
61
|
}
|