Skip to content

Commit 91914e0

Browse files
committed
Merge pull request #11 from dstranz/master
Disable iOS 7 workaround if you are using iOS 9 SDK
2 parents a33b0c8 + 035ab2a commit 91914e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CSGrowingTextView/CSGrowingTextView/CSGrowingTextView.m

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ - (void)initialize {
5757
_growAnimationDuration = 0.1;
5858
_growAnimationOptions = UIViewAnimationOptionCurveEaseInOut;
5959

60+
#ifdef __IPHONE_9_0
61+
_internalTextView = [[UITextView alloc] initWithFrame:self.bounds];
62+
#else
6063
// Fix for iOS 7+ jumping text problem
6164
// Solution based on http://stackoverflow.com/a/19339716/740474
6265
NSString *reqSysVer = @"7.0";
@@ -73,6 +76,7 @@ - (void)initialize {
7376
} else {
7477
_internalTextView = [[UITextView alloc] initWithFrame:self.bounds];
7578
}
79+
#endif
7680
_internalTextView.font = [UIFont systemFontOfSize:15];
7781
_internalTextView.autoresizingMask = (UIViewAutoresizingFlexibleWidth |
7882
UIViewAutoresizingFlexibleHeight);

0 commit comments

Comments
 (0)