Latest | 1.0.1 |
---|---|
Homepage | https://github.com/nbasham/iOS-UserPreferences |
License | Apache License, Version 2.0 |
Platforms | ios |
Authors |
iOS-UserPreferences provides convenience methods to get and set user preferences including primitive types.
Installation
If you’re using CocoaPods, then simply insert pod 'iOS-UserPreferences'
in your application’s Podfile
.
Otherwise, copy iOS-UserPreferences.h
and iOS-UserPreferences.m
into your project.
Examples
Get and set user preferences:
BOOL soundOn = [UserPreferences getBoolWithKey:@"soundOn" withDefault:YES];
[UserPreferences setInt:11 withKey:@"volume"];
Check to see if a key is defined and if not return true and define it, otherwise return
false. Useful when you only want to run a block of code once.
if ([UserPreferences isKeyUndefinedThenDefine:@"firstTime"]) {
// show intro
}
Authors
Norman Basham – @nbasham
License
iOS-UserPreferences is made available under the Apache 2.0 License. A full copy of the license is available in the LICENSE file.
Latest podspec
{ "name": "iOS-UserPreferences", "version": "1.0.1", "summary": "iOS-UserPreferences provides convenience methods to get and set user preferences.", "description": " UserPreferencesn ================n **UserPreferences** provides convenience methods to get and set user preferences.nn USAGEn -----nn ```objcn BOOL soundOn = [UserPreferences getBoolWithKey:@"soundOn" withDefault:YES];n [UserPreferences setInt:11 withKey:@"volume"];nn if ([UserPreferences isKeyUndefinedThenDefine:@"firstTime"]) {n // show intron }n ```n", "authors": { "Norman Basham": "[email protected]" }, "homepage": "https://github.com/nbasham/iOS-UserPreferences", "license": "Apache License, Version 2.0", "source": { "git": "https://github.com/nbasham/iOS-UserPreferences.git", "tag": "1.0.1" }, "source_files": "UserPreferences.**", "platforms": { "ios": null }, "requires_arc": false }
Fri, 04 Mar 2016 05:25:05 +0000