mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Added non-class-scanning-based approach fror registering js methods
This commit is contained in:
@@ -19,20 +19,9 @@
|
||||
|
||||
@implementation RCTViewManager
|
||||
|
||||
@synthesize bridge = _bridge;
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
+ (NSString *)moduleName
|
||||
{
|
||||
// Default implementation, works in most cases
|
||||
NSString *name = NSStringFromClass(self);
|
||||
if ([name hasPrefix:@"RK"]) {
|
||||
name = [name stringByReplacingCharactersInRange:(NSRange){0,@"RK".length} withString:@"RCT"];
|
||||
}
|
||||
if ([name hasPrefix:@"RCTUI"]) {
|
||||
name = [name substringFromIndex:@"RCT".length];
|
||||
}
|
||||
return name;
|
||||
}
|
||||
@synthesize bridge = _bridge;
|
||||
|
||||
- (UIView *)view
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user