Add main thread warnings and setter/getter assert

This commit is contained in:
Roy Marmelstein
2015-07-12 21:35:42 +02:00
parent 95016021b4
commit fd3eb94fcb
2 changed files with 21 additions and 2 deletions

View File

@@ -41,6 +41,7 @@
{
@private
// Configuration.
UITextView *_textView;
NSDictionary *_typingAttributes;
// Core.
@@ -134,7 +135,7 @@
[self.view addSubview:_placeholderTextKitComponents.textView];
// Create and configure our text view.
_textKitComponents.textView = _textView;
_textKitComponents.textView = _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;
@@ -189,6 +190,21 @@
#pragma mark - Configuration
@synthesize delegate = _delegate;
#pragma mark -
@dynamic textView;
- (UITextView *)textView{
ASDisplayNodeAssertMainThread();
return _textView;
}
- (void)setTextView:(UITextView *)textView
{
ASDisplayNodeAssertMainThread();
_textView = textView;
}
#pragma mark -
@dynamic typingAttributes;