Does it work with autolayout ?
jibeex opened this issue · comments
Jianbin LIN commented
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.
August commented
I'm very sorry for this issue, I have fixed it just now.