File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,28 @@ Import the framework:
3030import Configurations
3131```
3232
33- And get the default configuration:
33+ And get the current configuration:
3434
3535``` swift
36- let configuration = Configuration.defaultConfiguration ()
36+ let configuration = Configuration.current
3737if let someValue = configuration[" someKey" ] as? String {
3838 print (" someKey: \( someValue ) " )
3939}
4040```
4141
42+ By making use of generics the return type of a value can be inferred from the
43+ receiver.
44+
45+ For example; the ` text ` property of a ` UILabel ` expects a ` String ` ;
46+
47+ ``` swift
48+ let configuration = Configuration.current
49+ let label = UILabel ()
50+ label.text = configuration[" someKey" ]!
51+ ```
52+
53+ But do make sure that the value in the plist is of a matching type.
54+
4255## Contributing
4356
44571 . Fork it
You can’t perform that action at this time.
0 commit comments