Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made fill position adhere to self.bounds for scaling purposes #48

Merged
merged 2 commits into from Jan 1, 2019
Merged

made fill position adhere to self.bounds for scaling purposes #48

merged 2 commits into from Jan 1, 2019

Conversation

davidtperk
Copy link
Contributor

  1. Fill layer should be calculated on the view's bounds, not its frame. Transformations aren't applied to the frame property when the view is scaled, so the fill level isn't properly adjusted. From Apple:

Views have both a frame (coordinates in superview's coordinate system) and bounds (coordinates in own coordinate system) property, but if you transform a view, you should not use or rely on the frame property anymore. If you are using transformations, work with the bounds property only, not the frame property, as transformations are applied to the bounds, but aren't necessarily reflected accurately in frame.

  1. Added kCAMediaTimingFunctionEaseInEaseOut timing function to fillTo()'s CAKeyframeAnimation for a nice, cold, smooth pour.

@antiguab
Copy link
Owner

@dtp5 - dude, solid catch!! No clue how I missed this PR. Do you mind updating the branch (doubt there will be conflicts) and I can merge it? Thanks again!

@dimasno1
Copy link

will someone merge this branch into master?)

@antiguab antiguab merged commit 7348032 into antiguab:master Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants