Skip to content

Commit 95be499

Browse files
committed
dynamic prop for auto updates
1 parent 3265c26 commit 95be499

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

FXBlurView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class FXBlurView extends Component {
2222
FXBlurView.propTypes = {
2323
blurRadius: React.PropTypes.number,
2424
blurEnabled: React.PropTypes.bool,
25+
dynamic: React.PropTypes.bool,
2526
};
2627

2728
const FXBlurViewNative = requireNativeComponent('RCTFXBlurView', FXBlurView);

RCTFXBlurView/RCTFXBlurView/RCTFXBlurView.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ - (void)setBlurEnabled:(BOOL)blurEnabled
5656
[self layoutSubviews];
5757
}
5858

59+
- (void)setDynamic:(BOOL)dynamic
60+
{
61+
self.blurView.dynamic = dynamic;
62+
63+
[self layoutSubviews];
64+
}
65+
5966
@end

RCTFXBlurView/RCTFXBlurView/RCTFXBlurViewManager.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ - (UIView *)view
2323
return [[RCTFXBlurView alloc] init];
2424
}
2525

26-
RCT_EXPORT_VIEW_PROPERTY(blurRadius, float)
27-
RCT_EXPORT_VIEW_PROPERTY(blurEnabled, BOOL)
26+
RCT_EXPORT_VIEW_PROPERTY(blurRadius, float);
27+
RCT_EXPORT_VIEW_PROPERTY(blurEnabled, BOOL);
28+
RCT_EXPORT_VIEW_PROPERTY(dynamic, BOOL);
2829

2930
- (dispatch_queue_t)methodQueue
3031
{
3132
return dispatch_get_main_queue();
3233
}
3334

34-
@end
35+
@end

0 commit comments

Comments
 (0)