Merge pull request #1903 from nguyenhuy/ASButtonNode_updateTitle

[ASButtonNode] Correctly compare and update its title
This commit is contained in:
Adlai Holler
2016-07-12 11:34:22 -07:00
committed by GitHub

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];