self.checkCodeBtn.titleLabel.text = [NSString stringWithFormat:@"%zi秒", _time];
[self.checkCodeBtn setTitle:[NSString stringWithFormat:@"%zi秒", _time] forState:UIControlStateNormal];
在setTitle之前添加 titleLabel.text 则可以解决
self.checkCodeBtn.titleLabel.text = [NSString stringWithFormat:@"%zi秒", _time];
[self.checkCodeBtn setTitle:[NSString stringWithFormat:@"%zi秒", _time] forState:UIControlStateNormal];
在setTitle之前添加 titleLabel.text 则可以解决
本文标题:UIButton文字 标题 闪烁
本文链接:https://www.haomeiwen.com/subject/gjwfjttx.html
网友评论