Merge pull request #550 from marmelroy/issue-549

Access to underlying UITextView for more configuration options.
This commit is contained in:
appleguy
2015-07-30 22:04:30 -07:00
2 changed files with 16 additions and 1 deletions

View File

@@ -134,7 +134,7 @@
[self.view addSubview:_placeholderTextKitComponents.textView];
// Create and configure our text view.
_textKitComponents.textView = [[_ASDisabledPanUITextView alloc] initWithFrame:CGRectZero textContainer:_textKitComponents.textContainer];
_textKitComponents.textView = self.textView;
//_textKitComponents.textView = NO; // Unfortunately there's a bug here with iOS 7 DP5 that causes the text-view to only be one line high when scrollEnabled is NO. rdar://14729288
_textKitComponents.textView.delegate = self;
_textKitComponents.textView.editable = YES;
@@ -190,6 +190,15 @@
#pragma mark - Configuration
@synthesize delegate = _delegate;
- (UITextView *)textView
{
ASDisplayNodeAssertMainThread();
if (!_textKitComponents.textView) {
_textKitComponents.textView = [[_ASDisabledPanUITextView alloc] initWithFrame:CGRectZero textContainer:_textKitComponents.textContainer];
}
return _textKitComponents.textView;
}
#pragma mark -
@dynamic typingAttributes;