1
我试图创建成炭动画的UILabel一个字符,与归属文字动画w NSAttributedString?
//set attributed string
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"Yaba daba doo"];
[attributedString addAttribute:NSKernAttributeName value:@1 range:NSMakeRange(0, [attributedString length])];
//set animation
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0),
^{
[self animateShowText:[attributedString string] characterDelay:0.1 withCurrentLabel:self.myLabel];
[self.myLabel setAttributedText:attributedString];
});
我希望最后的消息将设置与属性的文字,并不能找到一个解决方案。在这里,我试图给字符串常规样式设置动画,并让标签显示属性字符串,但它不起作用。你如何保持属性和动画文本?