Last active
August 29, 2015 13:55
-
-
Save fictorial/8702637 to your computer and use it in GitHub Desktop.
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
static inline void dispatchOncePersistent(NSString *prefsKey, void (^aBlock)()) | |
{ | |
if (![[NSUserDefaults standardUserDefaults] boolForKey:prefsKey]) { | |
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:prefsKey]; | |
[[NSUserDefaults standardUserDefaults] synchronize]; | |
aBlock(); | |
} | |
} | |
/* | |
dispatchOncePersistent(@"show instructions for friend requests", ^{ | |
[SVProgressHUD showSuccessWithStatus:@"Select a friend to send them a friend request"]; | |
}); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment