Maybe you should add duration rather than self.shineDuration
I fixed it but another bug happen, and I fixed it finally with inserting these code below into your updateAttributedString
if (now > self.endTime) {
self.displaylink.paused = YES;
for (NSUInteger i = 0; i < self.attributedString.length; i++) {
self.characterAnimationDelays[i] = @(arc4random_uniform(self.fadeoutDuration / 2 * 100) / 100.0);
CGFloat remain = self.fadeoutDuration - [self.characterAnimationDelays[i] floatValue];
self.characterAnimationDurations[i] = @(arc4random_uniform(remain * 100) / 100.0);
}
if (self.completion) {
self.completion();
}
You use self.shineDuration in setAttributedText, it will affect the fadeoutAnimation, I add those code to update characterAnimationDurations to get the right fadeoutAnimation. Need pull request? Hope you can understand my Chiglish :)
I have tried to change the
_fadeoutDuration
from 2.5s to another value, but it doesn't work I find that you made mistake in this function,Maybe you should add
duration
rather thanself.shineDuration
I fixed it but another bug happen, and I fixed it finally with inserting these code below into yourupdateAttributedString
You use
self.shineDuration
insetAttributedText
, it will affect the fadeoutAnimation, I add those code to updatecharacterAnimationDurations
to get the right fadeoutAnimation. Need pull request? Hope you can understand my Chiglish :)