From caffd60a3f38eff27a9186b8468d8a536f602107 Mon Sep 17 00:00:00 2001 From: Alex Akers Date: Fri, 19 Jun 2015 08:51:05 -0700 Subject: [PATCH] [React Native] Update description on RCTText --- Libraries/Text/RCTText.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Libraries/Text/RCTText.m b/Libraries/Text/RCTText.m index 1ae432d90..9dc8e4200 100644 --- a/Libraries/Text/RCTText.m +++ b/Libraries/Text/RCTText.m @@ -34,6 +34,14 @@ return self; } +- (NSString *)description +{ + NSString *superDescription = super.description; + NSRange semicolonRange = [superDescription rangeOfString:@";"]; + NSString *replacement = [NSString stringWithFormat:@"; reactTag: %@; text: %@", self.reactTag, self.textStorage.string]; + return [superDescription stringByReplacingCharactersInRange:semicolonRange withString:replacement]; +} + - (void)reactSetFrame:(CGRect)frame { // Text looks super weird if its frame is animated.