mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-07 21:44:59 +00:00
Fix ASDISPLAYNODE_ASSERTIONS_ENABLED and ASDefaultPlaybackButton warnings #trivial (#880)
* Define ASDISPLAYNODE_ASSERTIONS_ENABLED explicitly * Add parameter type for drawRect: in ASDefaultPlaybackButton
This commit is contained in:
committed by
GitHub
parent
9d5857664f
commit
0aefbb65ba
@@ -21,7 +21,11 @@
|
||||
#import <pthread.h>
|
||||
#import <AsyncDisplayKit/ASBaseDefines.h>
|
||||
|
||||
#define ASDISPLAYNODE_ASSERTIONS_ENABLED (!defined(NS_BLOCK_ASSERTIONS))
|
||||
#if !defined(NS_BLOCK_ASSERTIONS)
|
||||
#define ASDISPLAYNODE_ASSERTIONS_ENABLED 1
|
||||
#else
|
||||
#define ASDISPLAYNODE_ASSERTIONS_ENABLED 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Note: In some cases it would be sufficient to do e.g.:
|
||||
|
||||
@@ -46,15 +46,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (nullable id<NSObject>)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer
|
||||
- (nullable NSDictionary *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer
|
||||
{
|
||||
return @{
|
||||
@"buttonType" : [NSNumber numberWithInt:_buttonType],
|
||||
@"buttonType" : @(self.buttonType),
|
||||
@"color" : self.tintColor
|
||||
};
|
||||
}
|
||||
|
||||
+ (void)drawRect:(CGRect)bounds withParameters:(id)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing
|
||||
+ (void)drawRect:(CGRect)bounds withParameters:(NSDictionary *)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing
|
||||
{
|
||||
ASDefaultPlaybackButtonType buttonType = (ASDefaultPlaybackButtonType)[parameters[@"buttonType"] intValue];
|
||||
UIColor *color = parameters[@"color"];
|
||||
|
||||
Reference in New Issue
Block a user