mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASImageNode] A ASImageNode debug feature showing pixel scaling amount
- shows a red text label overlay on bottom right hand corner of ASImageNodes with pixel scaling factor - import AsyncDisplayKit+Debug.h and enable using [ASImageNode setEnableImageDebugOverlay]
This commit is contained in:
27
AsyncDisplayKit/AsyncDisplayKit+Debug.m
Normal file
27
AsyncDisplayKit/AsyncDisplayKit+Debug.m
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// AsyncDisplayKit+Debug.m
|
||||
// AsyncDisplayKit
|
||||
//
|
||||
// Created by Hannah Troisi on 3/7/16.
|
||||
// Copyright © 2016 Facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AsyncDisplayKit+Debug.h"
|
||||
#import "ASDisplayNode+Subclasses.h"
|
||||
#import "ASTextNode.h"
|
||||
|
||||
static BOOL __enableImageSizeOverlay = NO;
|
||||
|
||||
@implementation ASImageNode (Debug)
|
||||
|
||||
+ (void)setImageDebugEnabled:(BOOL)enable;
|
||||
{
|
||||
__enableImageSizeOverlay = enable;
|
||||
}
|
||||
|
||||
+ (BOOL)shouldShowImageDebugOverlay
|
||||
{
|
||||
return __enableImageSizeOverlay;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user