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

Commit 78c8b5e

Browse files
author
Ivan Kovalisko
committed
Set contentMode to redraw on bounds changes
1 parent beb336a commit 78c8b5e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

SAMTextView/SAMTextView.m

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

91-
- (void)layoutSubviews
92-
{
93-
[super layoutSubviews];
94-
[self setNeedsDisplay];
95-
}
96-
9791
#pragma mark - NSObject
9892

9993
- (void)dealloc {
@@ -155,6 +149,7 @@ - (CGRect)placeholderRectForBounds:(CGRect)bounds {
155149

156150
- (void)initialize {
157151
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:self];
152+
self.contentMode = UIViewContentModeRedraw;
158153
}
159154

160155

0 commit comments

Comments
 (0)