Skip to content

Commit 4ca3069

Browse files
authored
Merge pull request #274 from onmyway133/fix/configuration
Update README about Configuration
2 parents 1ab91b7 + 7b4841c commit 4ca3069

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Demo/ImagePickerDemo/ImagePickerDemo/ViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ class ViewController: UIViewController, ImagePickerDelegate {
3636
}
3737

3838
func buttonTouched(button: UIButton) {
39+
var config = Configuration()
40+
config.doneButtonTitle = "Finish"
41+
config.noImagesTitle = "Sorry! There are no images here!"
42+
config.recordLocation = false
43+
3944
let imagePicker = ImagePickerController()
45+
imagePicker.configuration = configuration
4046
imagePicker.delegate = self
4147

4248
present(imagePicker, animated: true, completion: nil)

Demo/ImagePickerDemo/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ EXTERNAL SOURCES:
1717
:branch: swift3
1818
:git: https://github.com/hyperoslo/Hue.git
1919
ImagePicker:
20-
:path: ../../
20+
:path: "../../"
2121
Lightbox:
2222
:branch: swift-3
2323
:git: https://github.com/hyperoslo/Lightbox.git
@@ -33,7 +33,7 @@ CHECKOUT OPTIONS:
3333
:commit: 04437d8450a5ccc92af7e9bd08027bdced9fb589
3434
:git: https://github.com/hyperoslo/Lightbox.git
3535
Sugar:
36-
:commit: 9ab7edb15a436310ca38083cf5e25e7251541ddc
36+
:commit: 41e0f1e92bfd29b805fa74f87444975ca2976887
3737
:git: https://github.com/hyperoslo/Sugar.git
3838

3939
SPEC CHECKSUMS:

ImagePicker.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "ImagePicker"
33
s.summary = "Reinventing the way ImagePicker works."
4-
s.version = "2.0.0"
4+
s.version = "2.1.0"
55
s.homepage = "https://github.com/hyperoslo/ImagePicker"
66
s.license = 'MIT'
77
s.author = { "Hyper Interaktiv AS" => "ios@hyper.no" }

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@ imagePickerController.imageLimit = 5
4545

4646
##### Configuration
4747

48-
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:
48+
You can inject `Configuration` instance to ImagePicker, which allows you to configure text, colors, fonts and camera features
4949

5050
```swift
51-
Configuration.doneButtonTitle = "Finish"
52-
Configuration.noImagesTitle = "Sorry! There are no images here!"
51+
var configuration = Configuration()
52+
configuration.doneButtonTitle = "Finish"
53+
configuration.noImagesTitle = "Sorry! There are no images here!"
54+
configuration.recordLocation = false
55+
56+
let imagePicker = ImagePickerController()
57+
imagePicker.configuration = configuration
5358
```
5459

5560
##### Resolve assets

0 commit comments

Comments
 (0)