Skip to content

Instantly share code, notes, and snippets.

@johncblandii
Last active December 26, 2015 06:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
This is a header file with static methods for saving user defaults. It goes with: https://gist.github.com/johncblandii/7106773.
#import <Foundation/Foundation.h>
#define PREFERENCE_NAME_HERE @"someUniquePreferenceNameHere"
@interface Preferences : NSObject
#pragma mark Preferences
+(id)getUserPreference:(NSString*)forKey;
+(void)setUserPreference:(id)value forKey:(NSString*)key;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment