Correctly compare and update title of ASButtonNode

This commit is contained in:
Huy Nguyen 2016-07-12 21:25:22 +07:00
parent 6b44b5ac05
commit 4b331be1e8

View File

@ -184,7 +184,7 @@
newTitle = _normalAttributedTitle;
}
if ((_titleNode != nil || newTitle.length > 0) && newTitle != self.titleNode.attributedString) {
if ((_titleNode != nil || newTitle.length > 0) && [self.titleNode.attributedString isEqualToAttributedString:newTitle] == NO) {
_titleNode.attributedString = newTitle;
self.accessibilityLabel = _titleNode.accessibilityLabel;
[self setNeedsLayout];