react-native-navigation的迁移库

LNInterpolable.h 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // LNInterpolable.h
  3. //
  4. // Created by Leo Natan on 01/10/2016.
  5. // Copyright © 2016 Leo Natan. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. NS_SWIFT_NAME(InterpolationBehavior)
  10. typedef const NSString* LNInterpolationBehavior NS_TYPED_EXTENSIBLE_ENUM;
  11. /**
  12. Interpolate using the default behavor of each implementation.
  13. */
  14. extern LNInterpolationBehavior const LNInterpolationBehaviorUseDefault;
  15. /**
  16. Classes implementing this protocol support interpolation.
  17. */
  18. NS_SWIFT_NAME(Interpolable)
  19. @protocol LNInterpolable <NSObject>
  20. /**
  21. Interpolates between @c self and @c toValue accodring to @c progress using the default behavior.
  22. @param toValue The value to interpolate to
  23. @param progress The progress of the interpolation
  24. @return An object representing the interpolated value at the requested progress
  25. */
  26. - (instancetype)interpolateToValue:(id)toValue progress:(double)progress NS_SWIFT_NAME(interpolate(to:progress:));
  27. /**
  28. Interpolates between @c self and @c toValue according to @c progress using @c behavior.
  29. @param toValue The value to interpolate to
  30. @param behavior The bahvior to use for interpolation
  31. @param progress The progress of the interpolation
  32. @return An object representing the interpolated value at the requested progress
  33. */
  34. - (instancetype)interpolateToValue:(id)toValue progress:(double)progress behavior:(LNInterpolationBehavior)behavior NS_SWIFT_NAME(interpolate(to:progress:behavior:));
  35. NS_ASSUME_NONNULL_END
  36. @end