@@ -79,40 +79,40 @@ - (NSString *)formattedValue
7979
8080- (void )beginEditing
8181{
82- [self handleValueChange: ^
82+ [self handleValueChange: ^(FTCTextEntryFormatCoordinator *coordinator, id <FTCTextEntry> entry)
8383 {
84- [formatCoordinator beginEditing ];
85- entryUI .text = formatCoordinator .formattedValue ;
86- entryUI .selectedTextRange = formatCoordinator .currentSelectionRangeInFormattedValue ;
84+ [coordinator beginEditing ];
85+ entry .text = coordinator .formattedValue ;
86+ entry .selectedTextRange = coordinator .currentSelectionRangeInFormattedValue ;
8787 }];
8888}
8989
9090- (void )changeCharactersInRange : (NSRange )range replacement : (NSString *)replacement
9191{
92- [self handleValueChange: ^
92+ [self handleValueChange: ^(FTCTextEntryFormatCoordinator *coordinator, id <FTCTextEntry> entry)
9393 {
94- [formatCoordinator userReplacedInFormattedValueSubstringAtRange: range withString: replacement];
95- entryUI .text = formatCoordinator .formattedValue ;
96- entryUI .selectedTextRange = formatCoordinator .currentSelectionRangeInFormattedValue ;
94+ [coordinator userReplacedInFormattedValueSubstringAtRange: range withString: replacement];
95+ entry .text = coordinator .formattedValue ;
96+ entry .selectedTextRange = coordinator .currentSelectionRangeInFormattedValue ;
9797 }];
9898}
9999
100100- (void )endEditing
101101{
102- [self handleValueChange: ^
102+ [self handleValueChange: ^(FTCTextEntryFormatCoordinator *coordinator, id <FTCTextEntry> entry)
103103 {
104- [formatCoordinator endEditing ];
105- entryUI .text = formatCoordinator .formattedValue ;
104+ [coordinator endEditing ];
105+ entry .text = coordinator .formattedValue ;
106106 }];
107107}
108108
109- - (void )handleValueChange : (void (^)(void ))valueChange
109+ - (void )handleValueChange : (void (^)(FTCTextEntryFormatCoordinator *coordinator, id <FTCTextEntry> entry ))valueChange
110110{
111111 NSString *initialValue = formatCoordinator.rawValue ;
112112
113113 if ( NULL != valueChange )
114114 {
115- valueChange ();
115+ valueChange (formatCoordinator, entryUI );
116116 }
117117
118118 if ( NULL == _didChangeValueHandler )
0 commit comments