Skip to content

Commit

Permalink
Update README about using Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
onmyway133 committed Mar 24, 2017
1 parent 7dd4a51 commit ed91d6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Demo/ImagePickerDemo/ImagePickerDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ class ViewController: UIViewController, ImagePickerDelegate {
}

func buttonTouched(button: UIButton) {
var configuration = Configuration()
configuration.recordLocation = false
var config = Configuration()
config.doneButtonTitle = "Finish"
config.noImagesTitle = "Sorry! There are no images here!"
config.recordLocation = false

let imagePicker = ImagePickerController()
imagePicker.configuration = configuration
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ imagePickerController.imageLimit = 5

##### Configuration

Configure text, colors, fonts and camera features by just overriding the static variables in the ImagePicker [configuration](https://github.com/hyperoslo/ImagePicker/blob/master/Source/Configuration.swift) struct. As an example:
You can inject `Configuration` instance to ImagePicker, which allows you to configure text, colors, fonts and camera features

```swift
Configuration.doneButtonTitle = "Finish"
Configuration.noImagesTitle = "Sorry! There are no images here!"
var configuration = Configuration()
configuration.doneButtonTitle = "Finish"
configuration.noImagesTitle = "Sorry! There are no images here!"
configuration.recordLocation = false

let imagePicker = ImagePickerController()
imagePicker.configuration = configuration
```

##### Resolve assets
Expand Down

0 comments on commit ed91d6f

Please sign in to comment.