diff --git a/Libraries/Text/RCTTextField.m b/Libraries/Text/RCTTextField.m index 40da29de460a63..804a7479a8c941 100644 --- a/Libraries/Text/RCTTextField.m +++ b/Libraries/Text/RCTTextField.m @@ -302,21 +302,20 @@ +(NSMutableDictionary*)getAcessoryMapping { dispatch_once(&onceToken, ^{ textFieldAccessoryMapping = [[NSMutableDictionary alloc] init]; - // Do any other initialisation stuff here }); return textFieldAccessoryMapping; } /** - * The method to allow application register for injecting inputAccessoryView for particular keyboard type + * The method to allow application register handle to produce inputAccessoryView for particular keyboard type * handler presents instancdispatch_oncee of KeyboardAccessory type */ +(void) registerForKeyboardType:(NSNumber *)type handler:(KeyboardAccessory)handler{ - NSMutableDictionary *dct = [RCTTextField getAcessoryMapping]; - dct[type] = handler; + [RCTTextField getAcessoryMapping][type] = handler; + }