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

Glitch when using autolayout #17

Closed
andreamazz opened this issue Jul 16, 2015 · 12 comments
Closed

Glitch when using autolayout #17

andreamazz opened this issue Jul 16, 2015 · 12 comments
Assignees

Comments

@andreamazz
Copy link
Contributor

Hi :)
I'm using BAFluidView with interface builder and autolayout, and I noticed a glitch when doing so:

http://d.pr/v/aR6

looks like the bezier path are computed at the starting size, but once autolayout resizes it to fit a bigger screen those values are no longer valid.

This sample shows the issue (you might need to hide the frontmost mask in IB, or just run it on your device and tilt it :) )

Any idea?

Thanks

@antiguab
Copy link
Owner

hmmm - nothing is coming to me right off the bat, but I'll start looking into it!

@antiguab
Copy link
Owner

This one was tricky! :) In the end, I ended up overriding the 'layoutSubviews' method. If rotated, then the animations/frames that need to change are updated. We can't get notification to a UIView for when a device WILL rotate (unlike UIViewController's willRotateToInterfaceOrientation method), but rather once it's rotated. So there's is a slight lag that is unavoidable. Let me know how it goes!

@andreamazz
Copy link
Contributor Author

👍
Just tested it and it's working great.
Thanks!

@antiguab
Copy link
Owner

Awesome!

@andreamazz
Copy link
Contributor Author

Hi @antiguab
Looks like I spoke too soon 😬
it works fine on the simulator, but the issue is still present on the device.
You can try this project to reproduce the issue:
http://d.pr/f/1flIG

@antiguab
Copy link
Owner

Hey @andreamazz

weird - I don't seem to be getting an error running your project. Here's is what I get when I flip it on my device https://vid.me/5Jfr

@andreamazz
Copy link
Contributor Author

That's odd, on my device (iphone 6) it happens even without rotation (the view is sized on an iphone 5 screen, when autolayout stretches it to fit the 4.7" screen this happens):
http://d.pr/v/1kSg9

@antiguab antiguab reopened this Jul 30, 2015
@antiguab
Copy link
Owner

sadly I only have an iPhone 5 :( . It's a shot in the dark, but let me know if this works https://github.com/antiguab/BAFluidView/tree/iphone6_bug_fix_17. This introduces an issue with the animation speed, but I can fix that if it looks like we're going down the right path.

@andreamazz
Copy link
Contributor Author

I tried it and the issue persists.
I'm thinking how you can reproduce it on iPhone 5.... maybe if you create a freeform view controller in the storyboard, and give it a smaller width...

@antiguab
Copy link
Owner

Hey @andreamazz - sorry this project fell through the cracks :). Trying to pick it back up! Can you provide that project again? thanks!

@antiguab
Copy link
Owner

@andreamazz
Actually! I still have it. Here is a gif of me rotating on the device http://d.pr/v/1aJIW . Still not the same as you. Are you on version 0.1.6?

@andreamazz
Copy link
Contributor Author

Hi @antiguab
Yeah it was the latest version. In the end I worked around it :)
If the issue can't be reproduce I guess we could close this issue.

@antiguab antiguab self-assigned this Sep 5, 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

No branches or pull requests

2 participants