Skip to content

Rename LNAnimator to LNAnimatorTemp #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ class KeyboardAccessoryView extends Component {
const {onKeyboardResigned} = this.props;
let eventEmitter = null;
if (IsIOS) {
if (NativeModules.CustomInputController) {
eventEmitter = new NativeEventEmitter(NativeModules.CustomInputController);
if (NativeModules.CustomInputControllerTemp) {
eventEmitter = new NativeEventEmitter(NativeModules.CustomInputControllerTemp);
}
} else {
eventEmitter = DeviceEventEmitter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import ReactNative, {NativeModules, LayoutAnimation} from 'react-native';

const CustomInputController = NativeModules.CustomInputController;
const CustomInputControllerTemp = NativeModules.CustomInputControllerTemp;

export default class TextInputKeyboardManager {
static setInputComponent = (textInputRef, {component, initialProps}) => {
if (!textInputRef || !CustomInputController) {
if (!textInputRef || !CustomInputControllerTemp) {
return;
}
const reactTag = findNodeHandle(textInputRef);
if (reactTag) {
CustomInputController.presentCustomInputComponent(reactTag, {component, initialProps});
CustomInputControllerTemp.presentCustomInputComponent(reactTag, {component, initialProps});
}
};

static removeInputComponent = textInputRef => {
if (!textInputRef || !CustomInputController) {
if (!textInputRef || !CustomInputControllerTemp) {
return;
}
const reactTag = findNodeHandle(textInputRef);
if (reactTag) {
CustomInputController.resetInput(reactTag);
CustomInputControllerTemp.resetInput(reactTag);
}
};

static dismissKeyboard = () => {
CustomInputController.dismissKeyboard();
CustomInputControllerTemp.dismissKeyboard();
};

static toggleExpandKeyboard = (textInputRef, expand, performLayoutAnimation = false) => {
Expand All @@ -34,9 +34,9 @@ export default class TextInputKeyboardManager {
}
const reactTag = findNodeHandle(textInputRef);
if (expand) {
CustomInputController.expandFullScreenForInput(reactTag);
CustomInputControllerTemp.expandFullScreenForInput(reactTag);
} else {
CustomInputController.resetSizeForInput(reactTag);
CustomInputControllerTemp.resetSizeForInput(reactTag);
}
}
};
Expand Down
26 changes: 12 additions & 14 deletions lib/ios/reactnativeuilib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
1054385923BBA27900D04E48 /* UIResponder+FirstResponderTemp.m in Sources */ = {isa = PBXBuildFile; fileRef = 1054385823BBA27900D04E48 /* UIResponder+FirstResponderTemp.m */; };
1054385C23BC748700D04E48 /* KeyboardTrackingViewTempManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1054385A23BC748700D04E48 /* KeyboardTrackingViewTempManager.m */; };
10823FBE23B0BAA200429E9A /* Color+Interpolation.m in Sources */ = {isa = PBXBuildFile; fileRef = 10823FBD23B0BAA200429E9A /* Color+Interpolation.m */; };
10823FC023B0BE5600429E9A /* LNAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 10823FBF23B0BE5600429E9A /* LNAnimator.m */; };
10823FC223B0BE9100429E9A /* LNInterpolable.m in Sources */ = {isa = PBXBuildFile; fileRef = 10823FC123B0BE9100429E9A /* LNInterpolable.m */; };
10823FC623B0BF0C00429E9A /* NSValue+Interpolation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 10823FC523B0BF0C00429E9A /* NSValue+Interpolation.mm */; };
10823FCA23B0BF8400429E9A /* RCTCustomInputController.m in Sources */ = {isa = PBXBuildFile; fileRef = 10823FC923B0BF8400429E9A /* RCTCustomInputController.m */; };
10823FCD23B0BFAC00429E9A /* RCTCustomKeyboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 10823FCC23B0BFAC00429E9A /* RCTCustomKeyboardViewController.m */; };
1098BE4B246034EB0020440A /* LNAnimatorTemp.m in Sources */ = {isa = PBXBuildFile; fileRef = 1098BE4A246034EB0020440A /* LNAnimatorTemp.m */; };
1098BE4E246035090020440A /* RCTCustomInputControllerTemp.m in Sources */ = {isa = PBXBuildFile; fileRef = 1098BE4D246035090020440A /* RCTCustomInputControllerTemp.m */; };
D8AFAC9F204E004D00D28FED /* SafeAreaSpacerViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D8AFAC99204E004C00D28FED /* SafeAreaSpacerViewManager.m */; };
D8AFACA0204E004D00D28FED /* SafeAreaSpacerShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = D8AFAC9A204E004C00D28FED /* SafeAreaSpacerShadowView.m */; };
D8AFACA1204E004D00D28FED /* SafeAreaSpacerViewLocalData.m in Sources */ = {isa = PBXBuildFile; fileRef = D8AFAC9D204E004C00D28FED /* SafeAreaSpacerViewLocalData.m */; };
Expand Down Expand Up @@ -45,18 +45,18 @@
1054385A23BC748700D04E48 /* KeyboardTrackingViewTempManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyboardTrackingViewTempManager.m; sourceTree = "<group>"; };
1054385B23BC748700D04E48 /* KeyboardTrackingViewTempManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyboardTrackingViewTempManager.h; sourceTree = "<group>"; };
10823FB823B0B9D000429E9A /* Color+Interpolation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Color+Interpolation.h"; sourceTree = "<group>"; };
10823FB923B0B9DC00429E9A /* LNAnimator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LNAnimator.h; sourceTree = "<group>"; };
10823FBA23B0B9ED00429E9A /* LNInterpolable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LNInterpolable.h; sourceTree = "<group>"; };
10823FBB23B0B9FA00429E9A /* LNInterpolation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LNInterpolation.h; sourceTree = "<group>"; };
10823FBC23B0BA0900429E9A /* NSValue+Interpolation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSValue+Interpolation.h"; sourceTree = "<group>"; };
10823FBD23B0BAA200429E9A /* Color+Interpolation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Color+Interpolation.m"; sourceTree = "<group>"; };
10823FBF23B0BE5600429E9A /* LNAnimator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LNAnimator.m; sourceTree = "<group>"; };
10823FC123B0BE9100429E9A /* LNInterpolable.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LNInterpolable.m; sourceTree = "<group>"; };
10823FC523B0BF0C00429E9A /* NSValue+Interpolation.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSValue+Interpolation.mm"; sourceTree = "<group>"; };
10823FC823B0BF6B00429E9A /* RCTCustomInputController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTCustomInputController.h; sourceTree = "<group>"; };
10823FC923B0BF8400429E9A /* RCTCustomInputController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTCustomInputController.m; sourceTree = "<group>"; };
10823FCB23B0BF9600429E9A /* RCTCustomKeyboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTCustomKeyboardViewController.h; sourceTree = "<group>"; };
10823FCC23B0BFAC00429E9A /* RCTCustomKeyboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTCustomKeyboardViewController.m; sourceTree = "<group>"; };
1098BE49246034EB0020440A /* LNAnimatorTemp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LNAnimatorTemp.h; sourceTree = "<group>"; };
1098BE4A246034EB0020440A /* LNAnimatorTemp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LNAnimatorTemp.m; sourceTree = "<group>"; };
1098BE4C246035090020440A /* RCTCustomInputControllerTemp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTCustomInputControllerTemp.h; sourceTree = "<group>"; };
1098BE4D246035090020440A /* RCTCustomInputControllerTemp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTCustomInputControllerTemp.m; sourceTree = "<group>"; };
D8AFAC97204E004C00D28FED /* SafeAreaSpacerShadowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SafeAreaSpacerShadowView.h; sourceTree = "<group>"; };
D8AFAC98204E004C00D28FED /* SafeAreaSpacerViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SafeAreaSpacerViewManager.h; sourceTree = "<group>"; };
D8AFAC99204E004C00D28FED /* SafeAreaSpacerViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SafeAreaSpacerViewManager.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -110,13 +110,13 @@
10823FB723B0B9AC00429E9A /* lninterpolation */ = {
isa = PBXGroup;
children = (
1098BE49246034EB0020440A /* LNAnimatorTemp.h */,
1098BE4A246034EB0020440A /* LNAnimatorTemp.m */,
10823FB823B0B9D000429E9A /* Color+Interpolation.h */,
10823FB923B0B9DC00429E9A /* LNAnimator.h */,
10823FBA23B0B9ED00429E9A /* LNInterpolable.h */,
10823FBB23B0B9FA00429E9A /* LNInterpolation.h */,
10823FBC23B0BA0900429E9A /* NSValue+Interpolation.h */,
10823FBD23B0BAA200429E9A /* Color+Interpolation.m */,
10823FBF23B0BE5600429E9A /* LNAnimator.m */,
10823FC123B0BE9100429E9A /* LNInterpolable.m */,
10823FC523B0BF0C00429E9A /* NSValue+Interpolation.mm */,
);
Expand All @@ -126,8 +126,8 @@
10823FC723B0BF5100429E9A /* rctcustomInputcontroller */ = {
isa = PBXGroup;
children = (
10823FC823B0BF6B00429E9A /* RCTCustomInputController.h */,
10823FC923B0BF8400429E9A /* RCTCustomInputController.m */,
1098BE4C246035090020440A /* RCTCustomInputControllerTemp.h */,
1098BE4D246035090020440A /* RCTCustomInputControllerTemp.m */,
10823FCB23B0BF9600429E9A /* RCTCustomKeyboardViewController.h */,
10823FCC23B0BFAC00429E9A /* RCTCustomKeyboardViewController.m */,
);
Expand Down Expand Up @@ -248,20 +248,18 @@
files = (
10823FCD23B0BFAC00429E9A /* RCTCustomKeyboardViewController.m in Sources */,
1054385923BBA27900D04E48 /* UIResponder+FirstResponderTemp.m in Sources */,
10823FC023B0BE5600429E9A /* LNAnimator.m in Sources */,
1098BE4B246034EB0020440A /* LNAnimatorTemp.m in Sources */,
D8AFACA2204E004D00D28FED /* SafeAreaSpacerView.m in Sources */,
1054385C23BC748700D04E48 /* KeyboardTrackingViewTempManager.m in Sources */,
D8AFACA0204E004D00D28FED /* SafeAreaSpacerShadowView.m in Sources */,
10823FC623B0BF0C00429E9A /* NSValue+Interpolation.mm in Sources */,
1098BE4E246035090020440A /* RCTCustomInputControllerTemp.m in Sources */,
10823FC223B0BE9100429E9A /* LNInterpolable.m in Sources */,
10823FB123AFB14700429E9A /* ObservingInputAccessoryView.m in Sources */,
10823FAF23AFB12900429E9A /* KeyboardTrackingViewManager.m in Sources */,
D8D93E7620161B1F00A39331 /* HighlighterViewManager.m in Sources */,
1054385623BBA1C200D04E48 /* ObservingInputAccessoryViewTemp.m in Sources */,
D8E5A538204C4F170000DA01 /* SafeAreaManager.m in Sources */,
D8AFAC9F204E004D00D28FED /* SafeAreaSpacerViewManager.m in Sources */,
D8AFACA1204E004D00D28FED /* SafeAreaSpacerViewLocalData.m in Sources */,
10823FCA23B0BF8400429E9A /* RCTCustomInputController.m in Sources */,
10823FBE23B0BAA200429E9A /* Color+Interpolation.m in Sources */,
D8D93E7520161B1F00A39331 /* HighlighterView.m in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@end

@interface LNAnimator : NSObject
@interface LNAnimatorTemp : NSObject

@property (nonatomic, readonly) NSTimeInterval duration;
@property (nonatomic, strong, readonly) NSArray<id<LNAnimation>>* animations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2017 Wix. All rights reserved.
//

#import "LNAnimator.h"
#import "LNAnimatorTemp.h"

#import "LNInterpolation.h"

Expand Down Expand Up @@ -52,7 +52,7 @@ - (void)setProgress:(CGFloat)progress

@end

@implementation LNAnimator
@implementation LNAnimatorTemp
{
void (^_completionHandler)(BOOL);
CADisplayLink* _displayLink;
Expand All @@ -73,7 +73,7 @@ - (instancetype)_init

+ (instancetype)animatorWithDuration:(NSTimeInterval)duration animations:(NSArray<id<LNAnimation>>*)animations completionHandler:(void(^)(BOOL completed))completionHandler
{
LNAnimator* rv = [[LNAnimator alloc] _init];
LNAnimatorTemp* rv = [[LNAnimatorTemp alloc] _init];
if(rv)
{
rv->_duration = duration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// RCTCustomInputController.h
// RCTCustomInputControllerTemp.h
//
// Created by Leo Natan (Wix) on 13/12/2016.
// Copyright © 2016 Leo Natan. All rights reserved.
Expand All @@ -11,6 +11,6 @@
#import "RCTEventEmitter.h"
#endif

@interface RCTCustomInputController : RCTEventEmitter
@interface RCTCustomInputControllerTemp : RCTEventEmitter

@end
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
//
// RCTCustomInputController.m
// RCTCustomInputControllerTemp.m
//
// Created by Leo Natan (Wix) on 13/12/2016.
// Copyright © 2016 Leo Natan. All rights reserved.
//

#import "RCTCustomInputController.h"
#import "RCTCustomInputControllerTemp.h"
#import "RCTCustomKeyboardViewController.h"

#import <React/RCTUIManager.h>
#import <objc/runtime.h>

#import "LNAnimator.h"
#import "LNAnimatorTemp.h"

#define kHlperViewTag 0x1f1f1f

Expand Down Expand Up @@ -58,7 +58,7 @@ - (BOOL)resignFirstResponder
@end


@interface RCTCustomInputController () <_WXInputHelperViewDelegate> {
@interface RCTCustomInputControllerTemp () <_WXInputHelperViewDelegate> {
UIWindow *_fullScreenWindow;
BOOL _performingExpandTransition;
}
Expand All @@ -67,7 +67,7 @@ @interface RCTCustomInputController () <_WXInputHelperViewDelegate> {

@end

@implementation RCTCustomInputController
@implementation RCTCustomInputControllerTemp

+ (BOOL)requiresMainQueueSetup
{
Expand All @@ -84,7 +84,7 @@ - (dispatch_queue_t)methodQueue
return @[RCTCustomInputControllerKeyboardResigendEvent];
}

RCT_EXPORT_MODULE(CustomInputController)
RCT_EXPORT_MODULE(CustomInputControllerTemp)

- (instancetype)init
{
Expand Down Expand Up @@ -312,7 +312,7 @@ -(UIColor*)reactViewAvgColor:(RCTRootView*)rootView
[_fullScreenWindow layoutIfNeeded];
}];

[[LNAnimator animatorWithDuration:0.5
[[LNAnimatorTemp animatorWithDuration:0.5
animations:@[[LNViewAnimation animationWithView:_fullScreenWindow keyPath:@"frame" toValue:[NSValue valueWithCGRect:[UIScreen mainScreen].bounds]]]
completionHandler:^(BOOL completed)
{
Expand Down Expand Up @@ -360,7 +360,7 @@ -(UIColor*)reactViewAvgColor:(RCTRootView*)rootView
[_fullScreenWindow layoutIfNeeded];
[_fullScreenWindow endEditing:YES];

[[LNAnimator animatorWithDuration:0.5
[[LNAnimatorTemp animatorWithDuration:0.5
animations:@[[LNViewAnimation animationWithView:_fullScreenWindow keyPath:@"frame" toValue:[NSValue valueWithCGRect:keyboardTargetFrame]]]
completionHandler:^(BOOL completed)
{
Expand Down