FWABDefaultRepository
@interface FWABDefaultRepository : NSObject <FWABRandomRepository>
默认随机数仓库,存储于UserDefaults
-
Undocumented
Declaration
Objective-C
@property (nonatomic, class, readonly, strong) FWABDefaultRepository * _Nonnull sharedInstance
-
初始化,使用默认UserDefaults
Declaration
Objective-C
- (nonnull instancetype)init;
-
初始化,指定UserDefaults
Declaration
Objective-C
- (nonnull instancetype)initWithUserDefaults: (NSUserDefaults *_Nonnull)userDefaults;
-
获取指定key随机数
Declaration
Objective-C
- (NSInteger)getRandomNumberWithKey:(NSString *_Nonnull)key;
-
设置指定key随机数
Declaration
Objective-C
- (void)setRandomNumber:(NSInteger)randomNumber key:(NSString *_Nonnull)key;
-
删除指定key随机数
Declaration
Objective-C
- (void)removeRandomNumberWithKey:(NSString *_Nonnull)key;