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

Reset autoDismissTimer in autoDismissAnimated:atInterval: #71

Open
LukaszGrela opened this issue May 20, 2014 · 2 comments
Open

Reset autoDismissTimer in autoDismissAnimated:atInterval: #71

LukaszGrela opened this issue May 20, 2014 · 2 comments

Comments

@LukaszGrela
Copy link
Contributor

Only first entry is used e.g. when I want to reset default setup I can't as the timer is already set:

[popTipView autoDismissAnimated:YES at Interval:1.0];//used
[popTipView autoDismissAnimated:YES at Interval:10.0];//ignored

in real life it would be something along:

CMPopTipView *default = [self tooltipWithMessage:@"Message"];//default used
[default autoDismissAnimated:YES at Interval:10.0];//ignored

This can be fixed by adding:

[self.autoDismissTimer invalidate]; self.autoDismissTimer = nil;

in autoDismissAnimated:atInterval: before setting new timer

@johnnypayso
Copy link

Looks like the autoDismissTimer is not used unless you actually set it (via autoDismissAnimated). But there is somehow a built-in default timeout (which I have not been able to find in the source code) that is about 5 or 6 secs long.

So the symptom for me is that calling autoDismissAnimated has an effect only if the interval is shorter than the built-in timeout, e.g., 2 seconds.

@johnnypayso
Copy link

OK, I figured out my problem... I had wrapped the creation of the CMPopTipView in a helper method which was calling autoDismissAnimated with a default timeout. Since that timeout dismissed the view, the additional timeout (longer than the default) was ignored.

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