Skip to content

Commit

Permalink
Merge pull request #274 from onmyway133/fix/configuration
Browse files Browse the repository at this point in the history
Update README about Configuration
  • Loading branch information
onmyway133 authored Mar 24, 2017
2 parents 1ab91b7 + 7b4841c commit 4ca3069
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Demo/ImagePickerDemo/ImagePickerDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ class ViewController: UIViewController, ImagePickerDelegate {
}

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

let imagePicker = ImagePickerController()
imagePicker.configuration = configuration
imagePicker.delegate = self

present(imagePicker, animated: true, completion: nil)
Expand Down
4 changes: 2 additions & 2 deletions Demo/ImagePickerDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ EXTERNAL SOURCES:
:branch: swift3
:git: https://github.com/hyperoslo/Hue.git
ImagePicker:
:path: ../../
:path: "../../"
Lightbox:
:branch: swift-3
:git: https://github.com/hyperoslo/Lightbox.git
Expand All @@ -33,7 +33,7 @@ CHECKOUT OPTIONS:
:commit: 04437d8450a5ccc92af7e9bd08027bdced9fb589
:git: https://github.com/hyperoslo/Lightbox.git
Sugar:
:commit: 9ab7edb15a436310ca38083cf5e25e7251541ddc
:commit: 41e0f1e92bfd29b805fa74f87444975ca2976887
:git: https://github.com/hyperoslo/Sugar.git

SPEC CHECKSUMS:
Expand Down
2 changes: 1 addition & 1 deletion ImagePicker.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "ImagePicker"
s.summary = "Reinventing the way ImagePicker works."
s.version = "2.0.0"
s.version = "2.1.0"
s.homepage = "https://github.com/hyperoslo/ImagePicker"
s.license = 'MIT'
s.author = { "Hyper Interaktiv AS" => "[email protected]" }
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 4ca3069

Please sign in to comment.