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

Does it work with autolayout ? #11

Closed
jibeex opened this issue Aug 4, 2016 · 1 comment
Closed

Does it work with autolayout ? #11

jibeex opened this issue Aug 4, 2016 · 1 comment

Comments

@jibeex
Copy link

jibeex commented Aug 4, 2016

Hi, I have just got an issue when I try to animate the appearance of a view by extending its width from 0 to full width, from left to right.

view.makeFrame(CGRect(origin: origin, size: CGSize(width: 0, height: view.bounds.height))).makeAlpha(1).duration(0).then()
            .makeFrame(CGRect(origin: origin, size: CGSize(width: width, height: view.bounds.height))).duration(1).animate()

The view is expected to extend from the origin of the view.

            |                                                   |               
            |----->-------------->-----------------------------
            |                                                   |  
            |                                                   |  
            |                                                   | 

(view left border) (view right border)

However, it did extend from the center of the view.

            |                                                   |               
            |                           ---->------------->---------------------------
            |                                                   |  
            |                                                   |  
            |                                                   |  

In the storyboard, autolayout of this view is set as having 0 padding to the left border of the container.

@AugustRush
Copy link
Owner

I'm very sorry for this issue, I have fixed it just now.

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

No branches or pull requests

2 participants