88#import " RCTScrollViewComponentView.h"
99
1010#import < React/RCTAssert.h>
11- #import < react/components/scrollview/ScrollViewShadowNode .h>
11+ #import < react/components/scrollview/ScrollViewEventEmitter .h>
1212#import < react/components/scrollview/ScrollViewLocalData.h>
1313#import < react/components/scrollview/ScrollViewProps.h>
14- #import < react/components/scrollview/ScrollViewEventEmitter .h>
14+ #import < react/components/scrollview/ScrollViewShadowNode .h>
1515#import < react/graphics/Geometry.h>
1616
1717#import " RCTConversions.h"
@@ -63,9 +63,9 @@ - (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps
6363
6464 [super updateProps: props oldProps: oldProps];
6565
66- #define REMAP_PROP (reactName, localName, target ) \
66+ #define REMAP_PROP (reactName, localName, target ) \
6767 if (oldScrollViewProps.reactName != newScrollViewProps.reactName ) { \
68- target.localName = newScrollViewProps.reactName ; \
68+ target.localName = newScrollViewProps.reactName ; \
6969 }
7070
7171#define REMAP_VIEW_PROP (reactName, localName ) REMAP_PROP(reactName, localName, self)
@@ -80,11 +80,11 @@ - (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps
8080 MAP_SCROLL_VIEW_PROP (bouncesZoom);
8181 MAP_SCROLL_VIEW_PROP (canCancelContentTouches);
8282 MAP_SCROLL_VIEW_PROP (centerContent);
83- // MAP_SCROLL_VIEW_PROP(automaticallyAdjustContentInsets);
83+ // MAP_SCROLL_VIEW_PROP(automaticallyAdjustContentInsets);
8484 MAP_SCROLL_VIEW_PROP (decelerationRate);
8585 MAP_SCROLL_VIEW_PROP (directionalLockEnabled);
86- // MAP_SCROLL_VIEW_PROP(indicatorStyle);
87- // MAP_SCROLL_VIEW_PROP(keyboardDismissMode);
86+ // MAP_SCROLL_VIEW_PROP(indicatorStyle);
87+ // MAP_SCROLL_VIEW_PROP(keyboardDismissMode);
8888 MAP_SCROLL_VIEW_PROP (maximumZoomScale);
8989 MAP_SCROLL_VIEW_PROP (minimumZoomScale);
9090 MAP_SCROLL_VIEW_PROP (scrollEnabled);
@@ -95,30 +95,27 @@ - (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps
9595 MAP_SCROLL_VIEW_PROP (showsVerticalScrollIndicator);
9696 MAP_VIEW_PROP (scrollEventThrottle);
9797 MAP_SCROLL_VIEW_PROP (zoomScale);
98- // MAP_SCROLL_VIEW_PROP(contentInset);
99- // MAP_SCROLL_VIEW_PROP(scrollIndicatorInsets);
100- // MAP_SCROLL_VIEW_PROP(snapToInterval);
101- // MAP_SCROLL_VIEW_PROP(snapToAlignment);
98+ // MAP_SCROLL_VIEW_PROP(contentInset);
99+ // MAP_SCROLL_VIEW_PROP(scrollIndicatorInsets);
100+ // MAP_SCROLL_VIEW_PROP(snapToInterval);
101+ // MAP_SCROLL_VIEW_PROP(snapToAlignment);
102102}
103103
104- - (void )updateLocalData : (SharedLocalData)localData
105- oldLocalData : (SharedLocalData)oldLocalData
104+ - (void )updateLocalData : (SharedLocalData)localData oldLocalData : (SharedLocalData)oldLocalData
106105{
107106 assert (std::dynamic_pointer_cast<const ScrollViewLocalData>(localData));
108107 _scrollViewLocalData = std::static_pointer_cast<const ScrollViewLocalData>(localData);
109108 CGSize contentSize = RCTCGSizeFromSize (_scrollViewLocalData->getContentSize ());
110- _contentView.frame = CGRect {CGPointZero, contentSize};
109+ _contentView.frame = CGRect{CGPointZero, contentSize};
111110 _scrollView.contentSize = contentSize;
112111}
113112
114- - (void )mountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView
115- index : (NSInteger )index
113+ - (void )mountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView index : (NSInteger )index
116114{
117115 [_contentView insertSubview: childComponentView atIndex: index];
118116}
119117
120- - (void )unmountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView
121- index : (NSInteger )index
118+ - (void )unmountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView index : (NSInteger )index
122119{
123120 RCTAssert (childComponentView.superview == _contentView, @" Attempt to unmount improperly mounted component view." );
124121 [childComponentView removeFromSuperview ];
@@ -152,14 +149,17 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
152149 std::static_pointer_cast<const ScrollViewEventEmitter>(_eventEmitter)->onScrollBeginDrag ([self _scrollViewMetrics ]);
153150}
154151
155- - (void )scrollViewWillEndDragging : (UIScrollView *)scrollView withVelocity : (CGPoint)velocity targetContentOffset : (inout CGPoint *)targetContentOffset
152+ - (void )scrollViewWillEndDragging : (UIScrollView *)scrollView
153+ withVelocity : (CGPoint)velocity
154+ targetContentOffset : (inout CGPoint *)targetContentOffset
156155{
157156 std::static_pointer_cast<const ScrollViewEventEmitter>(_eventEmitter)->onScrollEndDrag ([self _scrollViewMetrics ]);
158157}
159158
160159- (void )scrollViewWillBeginDecelerating : (UIScrollView *)scrollView
161160{
162- std::static_pointer_cast<const ScrollViewEventEmitter>(_eventEmitter)->onMomentumScrollBegin ([self _scrollViewMetrics ]);
161+ std::static_pointer_cast<const ScrollViewEventEmitter>(_eventEmitter)
162+ ->onMomentumScrollBegin ([self _scrollViewMetrics ]);
163163}
164164
165165- (void )scrollViewDidEndDecelerating : (UIScrollView *)scrollView
0 commit comments