Last active
August 29, 2015 14:23
-
-
Save yutelin/5d33c6a05180c8f663a3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
extension NSUserDefaults { | |
func stringForKey(defaultName: String, defaultValue: String) -> String{ | |
if let value = self.stringForKey(defaultName){ | |
return value | |
} else { | |
return defaultValue | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment