SHSPhoneNumberFormatter Class Reference
| Inherits from | NSFormatter |
| Declared in | SHSPhoneNumberFormatter.h SHSPhoneNumberFormatter.m |
Tasks
Other Methods
-
– valuesForString: -
+ formattedRemove:AtIndex: -
+ isValuableChar: -
+ valuableCharCountIn: -
canAffectLeftViewByFormatterproperty -
prefixproperty -
+ 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 canAffectLeftViewByFormatterDiscussion
If you want to use leftView or leftViewMode property set this property to NO. Default is NO.
Declared In
SHSPhoneNumberFormatter.hClass Methods
digitOnlyString:
Returns all digits from string.
+ (NSString *)digitOnlyString:(NSString *)aStringDiscussion
Returns all digits from string.
Declared In
SHSPhoneNumberFormatter.hformattedRemove:AtIndex:
Remove required number of digits in phone text.
+ (NSString *)formattedRemove:(NSString *)string AtIndex:(NSRange)rangeDiscussion
Remove required number of digits in phone text.
Declared In
SHSPhoneNumberFormatter.hInstance 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 *)regexpDiscussion
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.haddOutputPattern: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 *)imagePathDiscussion
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.hresetFormats
Remove all patterns and apply clear format style. Default format is @“#############”, imagePath is nil.
- (void)resetFormatsDiscussion
Remove all patterns and apply clear format style. Default format is @“#############”, imagePath is nil.
Declared In
SHSPhoneNumberFormatter+UserConfig.hsetDefaultOutputPattern:
Apply default format style. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”
- (void)setDefaultOutputPattern:(NSString *)patternDiscussion
Apply default format style. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”
Declared In
SHSPhoneNumberFormatter+UserConfig.hsetDefaultOutputPattern:imagePath:
Apply default format style and image. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”, imagePath is “flag_ru”.
- (void)setDefaultOutputPattern:(NSString *)pattern imagePath:(NSString *)imagePathDiscussion
Apply default format style and image. Symbol ‘#’ assumes all digits. Example is “+# (###) ###-##-##”, imagePath is “flag_ru”.
Declared In
SHSPhoneNumberFormatter+UserConfig.hvaluesForString:
Converts input string to dictionary. Return value format {text: “FORMATTED_PHONE_NUMBER”, image: “PATH_TO_IMAGE”} Image path can be nil
- (NSDictionary *)valuesForString:(NSString *)aStringDiscussion
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