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

Issue when sliding from a long string to a shorter one #24

Closed
Deub27 opened this issue Aug 16, 2014 · 3 comments
Closed

Issue when sliding from a long string to a shorter one #24

Deub27 opened this issue Aug 16, 2014 · 3 comments

Comments

@Deub27
Copy link

Deub27 commented Aug 16, 2014

When using custom strings with different lengths in popUpView label, if you slide from a long string to a shorter string, the long string remains appearing a bit while target popupview size is already drawn.
It can be seen in your demo project.

@Deub27 Deub27 changed the title Issue when sliding from a long string to a shorter oen Issue when sliding from a long string to a shorter one Aug 16, 2014
@alskipp
Copy link
Owner

alskipp commented Aug 16, 2014

A quick fix for this is to prevent animation of "contents" for the _textLayer inside ASValuePopUpView In - (id)initWithFrame:(CGRect)frame, set the following options for _textLayer.actions.

 _textLayer.actions = @{@"bounds" : [NSNull null], @"position" : [NSNull null], @"contents" : [NSNull null]};

The text values will now update without any animation, solving this particular issue.

I'll need to look into this a bit closer to only disable the contents animation when the string length becomes shorter.

@Deub27
Copy link
Author

Deub27 commented Aug 17, 2014

Many thanks for this quick correction.
It will do the trick waiting for animating it again ;-)

@alskipp
Copy link
Owner

alskipp commented Apr 18, 2015

Many moons later…

The default is now to not animate the text (currently in development branch - will be merged to master on next release). Creating a mixed solution that would animate by default and temporarily stop animating when the results are glitchy would add code complexity for very little benefit.

@alskipp alskipp closed this as completed Apr 18, 2015
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