zipme / RQShineLabel

Secret app like text animation
MIT License
1.97k stars 218 forks source link

trying to do animation after fadeout completion but not work. #4

Closed Nazgugu closed 10 years ago

Nazgugu commented 10 years ago

I want to create the animation that the label shines first, then followed by fading out the text and then switching the image in an imageview and after the completion of switching image I want to shine some other text, and repeat this process forever. Yet I do not know why the completion block for fadeout is not called. Here is some of my code:

FoodworksTeam commented 10 years ago

Had the same problem. What is happening is that self.completion = NULL; is firing after the second completion block is set, but before the completion block is called.

Essentially you are erasing the block before it gets used. I took out the line above, and it works fine for me. You can handle the NULLing of the completion block yourself if need be.

Hope this helps

zipme commented 10 years ago

@IchabodDee I should probably nullify the completion when the shine or fadeOut methods (the ones without completion block) got called instead of after the completion block is called. What do you think?

FoodworksTeam commented 10 years ago

@zipme That is a good way to handle it. Essentially what you are trying to avoid is the scenario where you call shine or fadeOut and a completion block is used when it shouldn't be.

setting self.completion to NULL when shine or fadeOut are called should do the trick. Thanks a ton for the Shine Label it saved me a bunch of time for sure. When my app hits the app store I'll link it over so you can see your code at work.

Take care zipme

zipme commented 10 years ago

Thanks so much! And good luck with your app!