From 4b331be1e831934aae90a7903bee17fabeaa8a1d Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Tue, 12 Jul 2016 21:25:22 +0700 Subject: [PATCH] Correctly compare and update title of ASButtonNode --- AsyncDisplayKit/ASButtonNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 54c30ad47e..47bdc4ef21 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -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];