Skip to content

Commit

Permalink
Updated example gifs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Orlov committed Jan 16, 2021
1 parent 47d7982 commit 17cfb2a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 4 deletions.
Binary file removed Assets/currencyDemo.gif
Binary file not shown.
Binary file removed Assets/demo.gif
Binary file not shown.
Binary file added Assets/example_card_number.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/example_phone_number.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/example_placeholder_phone_number.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/example_sum.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Example/iOS Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ViewController: UIViewController {
let sumInputField = UITextField(frame: LayoutConstants.sumTextInputFieldFrame)

let phoneNumberFormatter = DefaultTextInputFormatter(textPattern: "### (###) ###-##-##")
let cardNumberFormatter = DefaultTextInputFormatter(textPattern: "XXXX XXXX XXXX", patternSymbol: "X")
let cardNumberFormatter = DefaultTextInputFormatter(textPattern: "XXXX XXXX XXXX XXXX", patternSymbol: "X")
let sumFormatter = SumTextInputFormatter(textPattern: "# ###,## $")
let placeholderPhoneNumberFormatter = PlaceholderTextInputFormatter(textPattern: "+## (###) ###-##-##")

Expand Down Expand Up @@ -129,7 +129,7 @@ private struct LayoutConstants {
static let phoneNumberLabelFrame = CGRect(x: 20, y: 60, width: UIScreen.main.bounds.width - 40, height: 20)
static let phoneNumberFieldFrame = CGRect(x: 20, y: 85, width: UIScreen.main.bounds.width - 40, height: 40)
static let cardNumberLabelFrame = CGRect(x: 20, y: 160, width: UIScreen.main.bounds.width - 40, height: 20)
static let cardNumberFieldFrame = CGRect(x: 20, y: 185, width: UIScreen.main.bounds.width - 40, height: 40)
static let cardNumberFieldFrame = CGRect(x: 16, y: 185, width: UIScreen.main.bounds.width - 40, height: 40)
static let sumLabelFrame = CGRect(x: 20, y: 260, width: UIScreen.main.bounds.width - 40, height: 20)
static let sumTextInputFieldFrame = CGRect(x: 20, y: 285, width: UIScreen.main.bounds.width - 40, height: 40)
}
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ To run the example project, clone the repo and run `pod install` from the Exampl

### Phone number example

![AnyFormatKitDemo: Simple text formatting in Swift](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/demo.gif)
![Phone number example](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/example_phone_number.gif)

### Currency example

![AnyFormatKitCurrencyDemo: Currency formatting in Swift](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/currencyDemo.gif)
![Currency example](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/example_sum.gif)

### Card number example

![Card number example](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/example_phone_number.gif)

### Placeholder phone number

![Placeholder number number example](https://github.com/luximetr/AnyFormatKit/blob/develop/Assets/example_placeholder_phone_number.gif)

## Requirements

Expand Down

0 comments on commit 17cfb2a

Please sign in to comment.