mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 13:01:13 +00:00
fd8b7dee77
- Unbreak ReactKit | Nick Lockwood - Refactor | Nick Lockwood - [ReactNative] fix touch cancel behavior | Spencer Ahrens - [ReactNative iOS] Fix responder issue with textInput | Eric Vicenti - [ReactNative] README updates - file watching troubleshooting, one-time code drop -> currently private repo | Spencer Ahrens - [ReactKit] Re-add README linebreaks | Ben Alpert
52 lines
1.3 KiB
Objective-C
52 lines
1.3 KiB
Objective-C
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@class RCTBridge;
|
|
|
|
typedef NS_ENUM(NSInteger, RCTTextEventType) {
|
|
RCTTextEventTypeFocus,
|
|
RCTTextEventTypeBlur,
|
|
RCTTextEventTypeChange,
|
|
RCTTextEventTypeSubmit,
|
|
RCTTextEventTypeEnd
|
|
};
|
|
|
|
typedef NS_ENUM(NSInteger, RCTScrollEventType) {
|
|
RCTScrollEventTypeStart,
|
|
RCTScrollEventTypeMove,
|
|
RCTScrollEventTypeEnd,
|
|
RCTScrollEventTypeStartDeceleration,
|
|
RCTScrollEventTypeEndDeceleration,
|
|
RCTScrollEventTypeEndAnimation,
|
|
};
|
|
|
|
@interface RCTEventDispatcher : NSObject
|
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
|
|
/**
|
|
* Send a named event. For most purposes, use the an
|
|
* event type of RCTEventTypeDefault, the other types
|
|
* are used internally by the React framework.
|
|
*/
|
|
- (void)sendEventWithName:(NSString *)name body:(NSDictionary *)body;
|
|
|
|
/**
|
|
* Send text events
|
|
*/
|
|
- (void)sendTextEventWithType:(RCTTextEventType)type
|
|
reactTag:(NSNumber *)reactTag
|
|
text:(NSString *)text;
|
|
|
|
/**
|
|
* Send scroll events
|
|
* (You can send a fake scroll event by passing nil for scrollView)
|
|
*/
|
|
- (void)sendScrollEventWithType:(RCTScrollEventType)type
|
|
reactTag:(NSNumber *)reactTag
|
|
scrollView:(UIScrollView *)scrollView
|
|
userData:(NSDictionary *)userData;
|
|
|
|
@end
|