AnthonyWhitakerJr / TapList_iOS

Sample mobile conversion of Kroger's ClickList website.
1 stars 1 forks source link

Quantity Selection & Keyboard Handler #41

Closed AnthonyWhitakerJr closed 7 years ago

AnthonyWhitakerJr commented 7 years ago

Quantity Selection:

New quantity selection interface!

When selecting a quantity, user is shown a popover table with numbers 1-10+. This allows quick and easy selection for numbers 1-9.

If the user selects '10+', they are presented with a text field and keyboard allowing manual entry of numbers 0-99. Defaults to '0' if no value is entered.

This control has already been integrated into the Product Details view. May find it's way to the main view as well.

Note: Must implement QuantityViewDataSource protocol to use this interface.

Closes #28.

KeyboardHandler:

Created a designated keyboard handler class to handle dismissing the keyboard when tapping outside of it as well as scrolling the view when the keyboard appears.

Also handles multiple fields/keyboards on the same view.

Controllers interested in this behavior need only initialize a KeyboardHandler property, and call startDismissingKeyboardOnTap() and/or startObservingKeyboardEvents().

Note: For the keyboard handler to scroll in response to keyboard events, a scroll view must be provided.

Closes #15.

Additional Improvements:

PlaceholderTextViews (ex. Special Instructions entry) now trim their contents. Leading & trailing whitespace will be removed.

simulator screen shot dec 15 2016 6 15 04 pm simulator screen shot dec 15 2016 6 15 30 pm simulator screen shot dec 15 2016 6 15 58 pm