Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit 3e34129

Browse files
committed
Re-draw placeholder when UITextView's layout or frame changes
This happened to me when embedding textview into table view cell. In landscape mode it got stretched because of new frame.
1 parent 3ff196b commit 3e34129

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SAMTextView/SAMTextView.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ - (void)setTextAlignment:(NSTextAlignment)textAlignment {
8888
[self setNeedsDisplay];
8989
}
9090

91+
- (void)layoutSubviews
92+
{
93+
[super layoutSubviews];
94+
[self setNeedsDisplay];
95+
}
9196

9297
#pragma mark - NSObject
9398

0 commit comments

Comments
 (0)