Skip to content

Commit

Permalink
Expose view as a property (refactor)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoran committed Jan 3, 2025
1 parent 9e749b6 commit b320127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/keyboard-avoiding-view/ios/KeyboardAvoidingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class KeyboardAvoidingView: ExpoView, UIGestureRecognizerDelegate, ViewBoundsObs
}

override func unmountChildComponentView(_ childComponentView: UIView, index: Int) {
if childComponentView === scrollView?.view() {
if childComponentView === scrollView?.view {
scrollView = nil
}
childComponentView.removeFromSuperview()
Expand All @@ -158,7 +158,7 @@ class KeyboardAvoidingView: ExpoView, UIGestureRecognizerDelegate, ViewBoundsObs
override func removeReactSubview(_ subview: UIView!) {
super.removeReactSubview(subview)

if subview === scrollView?.view() {
if subview === scrollView?.view {
scrollView = nil
}
subview.removeFromSuperview()
Expand Down
2 changes: 1 addition & 1 deletion modules/keyboard-avoiding-view/ios/ScrollViewWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@interface ScrollViewWrapper : NSObject

@property(nonatomic, readonly) BOOL isScrollViewPanning;
@property(nullable, nonatomic, readonly) UIView *view;

- (nullable instancetype)initWithView:(nonnull UIView *)view;
- (void)setInsetsFromKeyboardHeight:(CGFloat)keyboardHeight;
- (nullable UIView *)view;

@end

0 comments on commit b320127

Please sign in to comment.