Browse files

don't die trying to set the text to nil

  • Loading branch information...
1 parent d98197d commit 23363bcd27382ceaaeb518daa0e93c334297ca74 @joshaber joshaber committed Jun 26, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/UIKit/TUIAttributedString.m
View
2 lib/UIKit/TUIAttributedString.m
@@ -243,6 +243,8 @@ - (NSString *)text {
}
- (void)setText:(NSString *)text {
+ text = text ? : @" ";
+
[self beginEditing];
[self replaceCharactersInRange:NSMakeRange(0, [self length]) withString:[text copy]];
[self endEditing];

0 comments on commit 23363bc

Please sign in to comment.