mirror of
https://github.com/zhigang1992/RETableViewManager.git
synced 2026-04-28 12:45:34 +08:00
Update dependencies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- REFormattedNumberField (1.1)
|
||||
- REFormattedNumberField (1.1.1)
|
||||
- REValidation (0.1.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
@@ -7,7 +7,7 @@ DEPENDENCIES:
|
||||
- REValidation
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
REFormattedNumberField: c9f054b837f3c7707fd9b410069b8b0a3a5199da
|
||||
REFormattedNumberField: 53db6b5097b02f608999b7c95ec8ccda95be93be
|
||||
REValidation: 02160035110a63af1bf6ad1b8791837b3fa13584
|
||||
|
||||
COCOAPODS: 0.24.0
|
||||
|
||||
4
RETableViewManagerExample/Pods/Manifest.lock
generated
4
RETableViewManagerExample/Pods/Manifest.lock
generated
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- REFormattedNumberField (1.1)
|
||||
- REFormattedNumberField (1.1.1)
|
||||
- REValidation (0.1.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
@@ -7,7 +7,7 @@ DEPENDENCIES:
|
||||
- REValidation
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
REFormattedNumberField: c9f054b837f3c7707fd9b410069b8b0a3a5199da
|
||||
REFormattedNumberField: 53db6b5097b02f608999b7c95ec8ccda95be93be
|
||||
REValidation: 02160035110a63af1bf6ad1b8791837b3fa13584
|
||||
|
||||
COCOAPODS: 0.24.0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define COCOAPODS_POD_AVAILABLE_REFormattedNumberField
|
||||
#define COCOAPODS_VERSION_MAJOR_REFormattedNumberField 1
|
||||
#define COCOAPODS_VERSION_MINOR_REFormattedNumberField 1
|
||||
#define COCOAPODS_VERSION_PATCH_REFormattedNumberField 0
|
||||
#define COCOAPODS_VERSION_PATCH_REFormattedNumberField 1
|
||||
|
||||
// REValidation
|
||||
#define COCOAPODS_POD_AVAILABLE_REValidation
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,12 @@
|
||||
|
||||
#import "REFormattedNumberField.h"
|
||||
|
||||
@interface REFormattedNumberField ()
|
||||
|
||||
@property (copy, readwrite, nonatomic) NSString *currentFormattedText;
|
||||
|
||||
@end
|
||||
|
||||
@implementation REFormattedNumberField
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
@@ -56,9 +62,14 @@
|
||||
|
||||
- (void)formatInput:(UITextField *)textField
|
||||
{
|
||||
if (textField.text) {
|
||||
// If it was not deleteBackward event
|
||||
//
|
||||
if (![textField.text isEqualToString:self.currentFormattedText]) {
|
||||
__typeof (self) __weak weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
textField.text = [self.unformattedText re_stringWithNumberFormat:self.format];
|
||||
__typeof (self) __strong strongSelf = weakSelf;
|
||||
textField.text = [strongSelf.unformattedText re_stringWithNumberFormat:strongSelf.format];
|
||||
strongSelf.currentFormattedText = textField.text;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -78,11 +89,18 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (decimalPosition == -1) {
|
||||
self.text = @"";
|
||||
} else {
|
||||
self.text = [self.text substringWithRange:NSMakeRange(0, decimalPosition)];
|
||||
}
|
||||
|
||||
self.currentFormattedText = self.text;
|
||||
|
||||
//Since iOS6 the UIControlEventEditingChanged is not triggered by programmatically changing the text property of UITextField.
|
||||
//
|
||||
[self sendActionsForControlEvents:UIControlEventEditingChanged];
|
||||
}
|
||||
|
||||
- (NSString *)unformattedText
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>8B44FFA3-2E33-464E-B17C-5FAF1D1033C1</string>
|
||||
<string>20421FF4-8DCB-4913-9E8B-78EDBEA03102</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>RETableViewManagerExample</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
|
||||
Reference in New Issue
Block a user