-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
273 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#import <React/RCTAssert.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/// Retains collection of animators and itself implements `UIViewImplicitlyAnimating`. Object of this class | ||
/// fans out all call to methods of `UIViewAnimating` and `continueAnimationWithTimingParameters:durationFactor` to all | ||
/// the animators. The remaining methods of `UIViewImplicitlyAnimating`, are forwareded to the | ||
/// `animatorForImplicitAnimations`. | ||
/// | ||
/// This allows to pass instance of this class as the interruptible animator and have the `animators` be interruptible | ||
/// with timing curve of the implicit animator. This is useful for navigation item animation. | ||
/// We also get possibility to drive all the animators simultaneously with gesture (interactive animation). | ||
@interface RNSViewPropertyAnimatorCompositor : NSObject <UIViewImplicitlyAnimating> | ||
|
||
@property (nonnull, strong, nonatomic, readonly) NSArray<id<UIViewImplicitlyAnimating>> *animators; | ||
@property (nullable, strong, nonatomic) id<UIViewImplicitlyAnimating> implicitAnimator; | ||
|
||
/// @param animators - nonnull, nonempty animator list | ||
/// @param implicitAnimator - designated aniamator to return from `- animatorForImplicitAnimations` | ||
/// @return nonnull instance only in case above invariants are not violated | ||
- (nullable instancetype)initWithAnimators:(nonnull NSArray<id<UIViewImplicitlyAnimating>> *)animators | ||
implicitAnimator:(nullable id<UIViewImplicitlyAnimating>)implicitAnimator | ||
NS_DESIGNATED_INITIALIZER; | ||
|
||
- (nonnull id<UIViewImplicitlyAnimating>)animatorForImplicitAnimations; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.