SHSPhoneNumberFormatter Class Reference
Inherits from | NSFormatter |
Declared in | SHSPhoneNumberFormatter.h SHSPhoneNumberFormatter.m |
Tasks
Other Methods
-
– valuesForString:
-
+ formattedRemove:AtIndex:
-
+ isValuableChar:
-
+ valuableCharCountIn:
-
canAffectLeftViewByFormatter
property -
prefix
property -
+ digitOnlyString:
UserConfig Methods
Properties
canAffectLeftViewByFormatter
If you want to use leftView or leftViewMode property set this property to NO. Default is NO.
@property (readwrite) BOOL canAffectLeftViewByFormatter
Discussion
If you want to use leftView or leftViewMode property set this property to NO. Default is NO.
Declared In
SHSPhoneNumberFormatter.h
Class Methods
digitOnlyString:
Returns all digits from string.
+ (NSString *)digitOnlyString:(NSString *)aString
Discussion
Returns all digits from string.
Declared In
SHSPhoneNumberFormatter.h
formattedRemove:AtIndex:
Remove required number of digits in phone text.
+ (NSString *)formattedRemove:(NSString *)string AtIndex:(NSRange)range
Discussion
Remove required number of digits in phone text.
Declared In
SHSPhoneNumberFormatter.h
Instance Methods
addOutputPattern:forRegExp:
All number matched your regexp will formatted with your style. Symbol ‘#’ assumes all digits. Example: pattern is “+# (###) ###-##-##”, regexp is “^375\d*$”
- (void)addOutputPattern:(NSString *)pattern forRegExp:(NSString *)regexp
Discussion
All number matched your regexp will formatted with your style. Symbol ‘#’ assumes all digits. Example: pattern is “+# (###) ###-##-##”, regexp is “^375\d*$”
Declared In
SHSPhoneNumberFormatter+UserConfig.h
addOutputPattern:forRegExp:imagePath:
All number matched your regexp will formatted with your style and image Symbol ‘#’ assumes all digits. Example: pattern is “+# (###) ###-##-##”, imagePath is “flag_ru”, regexp is “^375\d*$”
- (void)addOutputPattern:(NSString *)pattern forRegExp:(NSString *)regexp imagePath:(NSString *)imagePath
Discussion
All number matched your regexp will formatted with your style and image Symbol ‘#’ assumes all digits. Example: pattern is “+# (###) ###-##-##”, imagePath is “flag_ru”, regexp is “^375\d*$”
Declared In
SHSPhoneNumberFormatter+UserConfig.h
resetFormats
Remove all patterns and apply clear format style. Default format is @“#############”, imagePath is nil.
- (void)resetFormats
Discussion
Remove all patterns and apply clear format style. Default format is @“#############”, imagePath is nil.
Declared In
SHSPhoneNumberFormatter+UserConfig.h
setDefaultOutputPattern:
Apply default format style. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”
- (void)setDefaultOutputPattern:(NSString *)pattern
Discussion
Apply default format style. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”
Declared In
SHSPhoneNumberFormatter+UserConfig.h
setDefaultOutputPattern:imagePath:
Apply default format style and image. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”, imagePath is “flag_ru”.
- (void)setDefaultOutputPattern:(NSString *)pattern imagePath:(NSString *)imagePath
Discussion
Apply default format style and image. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”, imagePath is “flag_ru”.
Declared In
SHSPhoneNumberFormatter+UserConfig.h
valuesForString:
Converts input string to dictionary. Return value format {text: “FORMATTED_PHONE_NUMBER”, image: “PATH_TO_IMAGE”} Image path can be nil
- (NSDictionary *)valuesForString:(NSString *)aString
Discussion
Converts input string to dictionary. Return value format {text: “FORMATTED_PHONE_NUMBER”, image: “PATH_TO_IMAGE”} Image path can be nil
Declared In
SHSPhoneNumberFormatter.h