mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Modernize our null annotations From the swift blog: This feature was first released in Xcode 6.3 with the keywords nullable and nonnull. Due to potential conflicts with third-party libraries, we’ve changed them in Xcode 7 to the _Nullable and _Nonnull you see here. drop-conflicts Reviewed By: cuva Differential Revision: D33121042 fbshipit-source-id: 821f5ec858d9afd5bfb1d6081c669f4ca18a36ed
63 lines
2.3 KiB
Objective-C
63 lines
2.3 KiB
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <React/RCTDefines.h>
|
|
#import <React/RCTGenericDelegateSplitter.h>
|
|
#import <React/RCTMountingTransactionObserving.h>
|
|
#import <React/RCTScrollableProtocol.h>
|
|
#import <React/RCTViewComponentView.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/*
|
|
* UIView class for <ScrollView> component.
|
|
*
|
|
* By design, the class does not implement any logic that contradicts to the normal behavior of UIScrollView and does
|
|
* not contain any special/custom support for things like floating headers, pull-to-refresh components,
|
|
* keyboard-avoiding functionality and so on. All that complexity must be implemented inside those components in order
|
|
* to keep the complexity of this component manageable.
|
|
*/
|
|
@interface RCTScrollViewComponentView : RCTViewComponentView <RCTMountingTransactionObserving>
|
|
|
|
/*
|
|
* Finds and returns the closet RCTScrollViewComponentView component to the given view
|
|
*/
|
|
+ (nullable RCTScrollViewComponentView *)findScrollViewComponentViewForView:(UIView *)view;
|
|
|
|
/*
|
|
* Returns an actual UIScrollView that this component uses under the hood.
|
|
*/
|
|
@property (nonatomic, strong, readonly) UIScrollView *scrollView;
|
|
|
|
/*
|
|
* Returns the subview of the scroll view that the component uses to mount all subcomponents into. That's useful to
|
|
* separate component views from auxiliary views to be able to reliably implement pull-to-refresh- and RTL-related
|
|
* functionality.
|
|
*/
|
|
@property (nonatomic, strong, readonly) UIView *containerView;
|
|
|
|
/*
|
|
* Returns a delegate splitter that can be used to subscribe for UIScrollView delegate.
|
|
*/
|
|
@property (nonatomic, strong, readonly)
|
|
RCTGenericDelegateSplitter<id<UIScrollViewDelegate>> *scrollViewDelegateSplitter;
|
|
|
|
@end
|
|
|
|
/*
|
|
* RCTScrollableProtocol is a protocol which RCTScrollViewManager uses to communicate with all kinds of `UIScrollView`s.
|
|
* Until Fabric has own command-execution pipeline we have to support that to some extent. The implementation shouldn't
|
|
* be perfect though because very soon we will migrate that to the new commands infra and get rid of this.
|
|
*/
|
|
@interface RCTScrollViewComponentView (ScrollableProtocol) <RCTScrollableProtocol>
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|