Skip to content

Commit

Permalink
Fix example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemoser committed Apr 2, 2014
1 parent 17f9695 commit 4ca38b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ NSFormatter subclass for formatting phone numbers.
### Format a number

```objc
PhoneNumberFormatter *formatter = [[PhoneNumberFormatter alloc] init];
ECPhoneNumberFormatter *formatter = [[ECPhoneNumberFormatter alloc] init];
NSString *formattedNumber = [formatter stringForObjectValue:@"2345677890"]
// formattedNumber = @"(234) 567-7890"
```
### Remove formatting
```objc
PhoneNumberFormatter *formatter = [[PhoneNumberFormatter alloc] init];
ECPhoneNumberFormatter *formatter = [[ECPhoneNumberFormatter alloc] init];
id objectValue;
NSString *error;
[formatter getObjectValue:&objectValue forString:@"1 (234) 567-8900" errorDescription:&error];
Expand All @@ -25,7 +25,7 @@ NSString *error;
### Format a NSTextField

```objc
PhoneNumberFormatter *formatter = [[PhoneNumberFormatter alloc] init];
ECPhoneNumberFormatter *formatter = [[ECPhoneNumberFormatter alloc] init];
textField.cell.formatter = formatter;

// textField.objectValue will be unformatted
Expand Down

0 comments on commit 4ca38b5

Please sign in to comment.