Add nullability annotations to LOTAnimationView

This commit is contained in:
Kyle Bashour
2017-05-03 10:55:08 -07:00
parent b29efe9a18
commit dfbcfc8999

View File

@@ -13,11 +13,11 @@ typedef void (^LOTAnimationCompletionBlock)(BOOL animationFinished);
@interface LOTAnimationView : LOTView
+ (instancetype)animationNamed:(NSString *)animationName NS_SWIFT_NAME(init(name:));
+ (instancetype)animationNamed:(NSString *)animationName inBundle:(NSBundle *)bundle NS_SWIFT_NAME(init(name:bundle:));
+ (instancetype)animationFromJSON:(NSDictionary *)animationJSON NS_SWIFT_NAME(init(json:));
+ (nullable instancetype)animationNamed:(nonnull NSString *)animationName NS_SWIFT_NAME(init(name:));
+ (nullable instancetype)animationNamed:(nonnull NSString *)animationName inBundle:(nonnull NSBundle *)bundle NS_SWIFT_NAME(init(name:bundle:));
+ (nullable instancetype)animationFromJSON:(nonnull NSDictionary *)animationJSON NS_SWIFT_NAME(init(json:));
- (instancetype)initWithContentsOfURL:(NSURL *)url;
- (nullable instancetype)initWithContentsOfURL:(nonnull NSURL *)url;
@property (nonatomic, readonly) BOOL isAnimationPlaying;
@property (nonatomic, assign) BOOL loopAnimation;
@@ -25,12 +25,12 @@ typedef void (^LOTAnimationCompletionBlock)(BOOL animationFinished);
@property (nonatomic, assign) CGFloat animationSpeed;
@property (nonatomic, readonly) CGFloat animationDuration;
- (void)playWithCompletion:(LOTAnimationCompletionBlock)completion;
- (void)playWithCompletion:(nullable LOTAnimationCompletionBlock)completion;
- (void)play;
- (void)pause;
- (void)addSubview:(LOTView *)view
toLayerNamed:(NSString *)layer;
- (void)addSubview:(nonnull LOTView *)view
toLayerNamed:(nonnull NSString *)layer;
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
@property (nonatomic) LOTViewContentMode contentMode;