2015-03-23 20:28:42 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
#import "RCTView.h"
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
#import "RCTPointerEvents.h"
|
|
|
|
|
|
|
|
@protocol RCTAutoInsetsProtocol;
|
|
|
|
|
2015-05-19 13:21:52 +00:00
|
|
|
@class RCTView;
|
2015-05-20 15:33:16 +00:00
|
|
|
typedef void (^RCTViewEventHandler)(RCTView *view);
|
2015-05-19 13:21:52 +00:00
|
|
|
|
2015-02-20 04:10:52 +00:00
|
|
|
@interface RCTView : UIView
|
|
|
|
|
2015-05-20 15:33:16 +00:00
|
|
|
@property (nonatomic, copy) RCTViewEventHandler accessibilityTapHandler;
|
|
|
|
@property (nonatomic, copy) RCTViewEventHandler magicTapHandler;
|
2015-05-19 13:21:52 +00:00
|
|
|
|
2015-03-06 00:36:41 +00:00
|
|
|
/**
|
|
|
|
* Used to control how touch events are processed.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
@property (nonatomic, assign) RCTPointerEvents pointerEvents;
|
|
|
|
|
|
|
|
+ (void)autoAdjustInsetsForView:(UIView<RCTAutoInsetsProtocol> *)parentView
|
|
|
|
withScrollView:(UIScrollView *)scrollView
|
|
|
|
updateOffset:(BOOL)updateOffset;
|
|
|
|
|
2015-03-06 00:36:41 +00:00
|
|
|
/**
|
|
|
|
* Find the first view controller whose view, or any subview is the specified view.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
+ (UIEdgeInsets)contentInsetsForView:(UIView *)curView;
|
|
|
|
|
2015-03-11 02:03:59 +00:00
|
|
|
/**
|
|
|
|
* This is an optimization used to improve performance
|
|
|
|
* for large scrolling views with many subviews, such as a
|
|
|
|
* list or table. If set to YES, any clipped subviews will
|
|
|
|
* be removed from the view hierarchy whenever -updateClippedSubviews
|
|
|
|
* is called. This would typically be triggered by a scroll event
|
|
|
|
*/
|
|
|
|
@property (nonatomic, assign) BOOL removeClippedSubviews;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Hide subviews if they are outside the view bounds.
|
|
|
|
* This is an optimisation used predominantly with RKScrollViews
|
|
|
|
* but it is applied recursively to all subviews that have
|
|
|
|
* removeClippedSubviews set to YES
|
|
|
|
*/
|
|
|
|
- (void)updateClippedSubviews;
|
|
|
|
|
2015-05-13 15:22:21 +00:00
|
|
|
/**
|
|
|
|
* Border radii.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, assign) CGFloat borderRadius;
|
|
|
|
@property (nonatomic, assign) CGFloat borderTopLeftRadius;
|
|
|
|
@property (nonatomic, assign) CGFloat borderTopRightRadius;
|
|
|
|
@property (nonatomic, assign) CGFloat borderBottomLeftRadius;
|
|
|
|
@property (nonatomic, assign) CGFloat borderBottomRightRadius;
|
|
|
|
|
2015-03-26 08:43:17 +00:00
|
|
|
/**
|
|
|
|
* Border colors.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, assign) CGColorRef borderTopColor;
|
|
|
|
@property (nonatomic, assign) CGColorRef borderRightColor;
|
|
|
|
@property (nonatomic, assign) CGColorRef borderBottomColor;
|
|
|
|
@property (nonatomic, assign) CGColorRef borderLeftColor;
|
|
|
|
@property (nonatomic, assign) CGColorRef borderColor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Border widths.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, assign) CGFloat borderTopWidth;
|
|
|
|
@property (nonatomic, assign) CGFloat borderRightWidth;
|
|
|
|
@property (nonatomic, assign) CGFloat borderBottomWidth;
|
|
|
|
@property (nonatomic, assign) CGFloat borderLeftWidth;
|
|
|
|
@property (nonatomic, assign) CGFloat borderWidth;
|
|
|
|
|
2015-02-20 04:10:52 +00:00
|
|
|
@end
|