marcosgriselli / ViewAnimator

ViewAnimator brings your UI to life with just one line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type 'AnimationType' has no member 'from'

d0hnj0e opened this issue · comments

Steps to Reproduce the Problem

  1. import ViewAnimator
  2. let moveFromLeftAnimation = AnimationType.from(direction: .left, offset: 50)
  3. swipeTextLabelOutlet.animate(animations: [moveFromLeftAnimation], initialAlpha: 0, finalAlpha: 1, delay: baseDelay + delayTwo, duration: duration)

results in

Cannot infer contextual base in reference to member 'left'
Type 'AnimationType' has no member 'from'

Possible choices are

Screenshot 2020-09-19 at 08 56 18

Specifications

  • Version: Xcode Version 12.0 (12A7209), iOS 14.0, iPhone 11 Pro, ViewAnimator v. 3.0.1

Same problem

@d0hnj0e @boardmain I changed the API in 3.0 to use AnimationType.vector(CGVector) to support different types of animations. This change brought some issues apparently which I'm still to review/fix (#72). If you'd like to keep using the .from API I recommend you stick to version 2.7.1 for the moment.

Thanks for the clarification!

@marcosgriselli Will AnimationType.from be added back or should I stick with the vector?

@samdogg7 I can add it back. Clearly the vector API idea created more confusion than solutions 😅

@marcosgriselli You don't need to add it back. I was originally confused, I didn't see anything about vector on the readme page. Figured it out through your examples!

Btw i had to use 2.7.0 to resolve this issue.