Simple lazy loader for Objective-C/Swift. Basis usage:
#import <GNLazy/GNLazy.h>
GNLazy<NSString*>* lazyString = [GNLazy createFromLoader:^{
return @"lazy string";
}];
NSString* stringLoadedSafely = [lazy safeGet];
NSString* stringLoadedFast = [lazy fastGet];
To run the example project, clone the repo, and run pod install
from the Example directory first.
Minimum supported iOS
version: 8.x
Dependencies: GNExceptions
, GNLog
& GNPreconditions
GNLazy is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "GNLazy"
Games Neox, games.neox@gmail.com
GNLazy is available under the MIT license. See the LICENSE file for more info.