romaonthego / REFormattedNumberField

UITextField subclass that allows numeric input in a predefined format.
MIT License
201 stars 37 forks source link

1.1.3 Breaks compatibility with 1.1.2 #9

Closed BobReid closed 10 years ago

BobReid commented 10 years ago

If you use [RENumberItem itemWithTitle:@"title" value:nil placeholder:@"placeholder"] then item.format is null and REFormattedNumberField will not accept any input.

In 1.1.2 the field would still accept any decimal characters.

Possible fixes.

  1. override -[RENumberItem initWithTitle:value:placeholder:] and forward to -[RENumberItem initWithTitle:value:placeholder:format:](making it a true designated initializer).
  2. Patch REFormattedNumberField to work with a nil item format.

This was especially annoying because even though we had pinned the version RETableViewManager it had specified a dependency on REFormattedNumberField of >= 1.1.2 and broke the current behaviour.

romaonthego commented 10 years ago

Fixed, tanks!