mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-01 12:23:20 +08:00
[ASDisplayView] Remove some gunk (#2095)
This commit is contained in:
@@ -101,18 +101,11 @@
|
||||
#endif
|
||||
|
||||
- (void)layoutSublayers
|
||||
{
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
[super layoutSublayers];
|
||||
|
||||
ASDisplayNode *node = self.asyncdisplaykit_node;
|
||||
if (ASDisplayNodeThreadIsMain()) {
|
||||
[node __layout];
|
||||
} else {
|
||||
ASDisplayNodeFailAssert(@"not reached assertion");
|
||||
dispatch_async(dispatch_get_main_queue(), ^ {
|
||||
[node __layout];
|
||||
});
|
||||
}
|
||||
[self.asyncdisplaykit_node __layout];
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplay
|
||||
|
||||
@@ -43,10 +43,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - NSObject Overrides
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithFrame:CGRectZero];
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
@@ -57,14 +53,6 @@
|
||||
|
||||
#pragma mark - UIView Overrides
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if (!(self = [super initWithFrame:frame]))
|
||||
return nil;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)willMoveToWindow:(UIWindow *)newWindow
|
||||
{
|
||||
BOOL visible = (newWindow != nil);
|
||||
@@ -192,25 +180,9 @@
|
||||
|
||||
- (void)setNeedsDisplay
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
// Standard implementation does not actually get to the layer, at least for views that don't implement drawRect:.
|
||||
if (ASDisplayNodeThreadIsMain()) {
|
||||
[self.layer setNeedsDisplay];
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^ {
|
||||
[self.layer setNeedsDisplay];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setNeedsLayout
|
||||
{
|
||||
if (ASDisplayNodeThreadIsMain()) {
|
||||
[super setNeedsLayout];
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^ {
|
||||
[super setNeedsLayout];
|
||||
});
|
||||
}
|
||||
[self.layer setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (UIViewContentMode)contentMode
|
||||
|
||||
Reference in New Issue
Block a user