Add a warning if [super layout] is not called (which causes big problems for ASLayout.)

This commit is contained in:
Ethan Nagel 2016-02-24 10:28:22 -08:00
parent eb6aa28d42
commit 26dcad5218
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
* *
* @discussion Subclasses override this method to layout all subnodes or subviews. * @discussion Subclasses override this method to layout all subnodes or subviews.
*/ */
- (void)layout; - (void)layout ASDISPLAYNODE_REQUIRES_SUPER;
/** /**
* @abstract Called on the main thread by the view's -layoutSubviews, after -layout. * @abstract Called on the main thread by the view's -layoutSubviews, after -layout.

View File

@ -186,6 +186,7 @@
{ {
ASDisplayNodeAssertMainThread(); ASDisplayNodeAssertMainThread();
[super layout];
[self _layoutTextView]; [self _layoutTextView];
} }