[React Native] Update description on RCTText

This commit is contained in:
Alex Akers 2015-06-19 08:51:05 -07:00
parent 6cf570db35
commit caffd60a3f
1 changed files with 8 additions and 0 deletions

View File

@ -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.