Last active
December 3, 2017 21:31
-
-
Save Winchariot/198c4ab32d3a4d3b42a9dcfe46f61666 to your computer and use it in GitHub Desktop.
Load data from a plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loadValueFromPlist() { | |
guard let plistPath: String = Bundle.main.path(forResource: "Info", ofType: "plist"), | |
let dict = NSDictionary(contentsOfFile: plistPath) else { return } | |
if let myValue = dict["myKey"] as? String { | |
//make use of myValue | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment