facebookarchive / Shimmer

An easy way to add a simple, shimmering effect to any view in an iOS app.
Other
9.35k stars 1.11k forks source link

fadeout with completion #33

Closed paolocampitelli closed 10 years ago

paolocampitelli commented 10 years ago

seems that fadeOutWithCompletion block doesn't work, only fadeout without block. Thanks.

grp commented 10 years ago

What are you seeing when you try using it? A crash?

paolocampitelli commented 10 years ago

hi thanks for your reply!

no crash, fadeOutWithCompletion block doesn't called my method:

[self.shineLabel shineWithCompletion:^{
    [self.shineLabel fadeOutWithCompletion:^{
        [self dismissLoadingView];
    }];
}];

Fade out works but no [self dismissLoadingView] called in my case!

Thanks!

grp commented 10 years ago

Hm, have you tried adding a NSLog() call in that method, or stepping through in a debugger? I tried it in a test project, so without your exact setup it might be hard to reproduce / debug.

paolocampitelli commented 10 years ago

yes I tried to put an NSlog and breakpoint into my dismissLoadingView Method but it isn't called and No Logs... did you tried it? My workaround for the moment is: [self.shineLabel shineWithCompletion:^{ [self.shineLabel fadeOut]; [self performSelector:@selector(dismissLoadingView) withObject:self afterDelay:2];

}];

Thanks Paolo

grp commented 10 years ago

Where is your shineWithCompletion: method from? It's not defined in the Shimmer headers.

paolocampitelli commented 10 years ago

You are perfectly right, It's my mistake. REALLY sorry and thanks for your library :)

grp commented 10 years ago

Cool, glad you figured it out.