Skip to content

Commit af6aff2

Browse files
authored
fix: move off update mask for setting up view (#20)
1 parent 21f8d4b commit af6aff2

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

ios/LiquidGlassView.mm

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
5555
{
5656
const auto &oldViewProps = *std::static_pointer_cast<LiquidGlassViewProps const>(_props);
5757
const auto &newViewProps = *std::static_pointer_cast<LiquidGlassViewProps const>(props);
58-
58+
5959
if (oldViewProps.tintColor != newViewProps.tintColor) {
6060
_view.effectTintColor = RCTUIColorFromSharedColor(newViewProps.tintColor);
6161
}
@@ -101,18 +101,9 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
101101
_view.layer.cornerCurve = self.layer.cornerCurve;
102102
}
103103

104-
105104
[super updateProps:props oldProps:oldProps];
106105
}
107106

108-
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
109-
[super finalizeUpdates:updateMask];
110-
111-
if (updateMask == RNComponentViewUpdateMaskProps) {
112-
[_view setupView];
113-
}
114-
}
115-
116107
- (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
117108
oldLayoutMetrics:(const LayoutMetrics &)oldLayoutMetrics
118109
{

ios/LiquidGlassView.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ import UIKit
2626
@available(iOS 26.0, *)
2727
@objc public class LiquidGlassViewImpl: UIVisualEffectView {
2828
private var isFirstMount: Bool = true
29-
@objc public var effectTintColor: UIColor?
30-
@objc public var interactive: Bool = false
31-
@objc public var style: LiquidGlassEffect = .regular
29+
@objc public var effectTintColor: UIColor? {
30+
didSet { self.setupView() }
31+
}
32+
@objc public var interactive: Bool = false {
33+
didSet { self.setupView() }
34+
}
35+
@objc public var style: LiquidGlassEffect = .regular {
36+
didSet { self.setupView() }
37+
}
3238

3339
public override func layoutSubviews() {
3440
if (self.effect != nil) { return }

0 commit comments

Comments
 (0)