This repository was archived by the owner on Feb 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#import < AsyncDisplayKit/ASBaseDefines.h>
1717#import < AsyncDisplayKit/ASDimension.h>
1818#import < AsyncDisplayKit/ASAsciiArtBoxCreator.h>
19+ #import < AsyncDisplayKit/ASObjectDescriptionHelpers.h>
1920#import < AsyncDisplayKit/ASLayoutElement.h>
2021
2122NS_ASSUME_NONNULL_BEGIN
@@ -558,7 +559,7 @@ extern NSInteger const ASDefaultDrawingPriority;
558559/* *
559560 * Convenience methods for debugging.
560561 */
561- @interface ASDisplayNode (Debugging) <ASLayoutElementAsciiArtProtocol>
562+ @interface ASDisplayNode (Debugging) <ASLayoutElementAsciiArtProtocol, ASDebugNameProvider >
562563
563564/* *
564565 * @abstract Return a description of the node hierarchy.
Original file line number Diff line number Diff line change 1111
1212NS_ASSUME_NONNULL_BEGIN
1313
14+ @protocol ASDebugNameProvider <NSObject >
15+
16+ @required
17+ /* *
18+ * @abstract Name that is printed by ascii art string and displayed in description.
19+ */
20+ @property (nullable , nonatomic , copy ) NSString *debugName;
21+
22+ @end
23+
1424/* *
1525 * Your base class should conform to this and override `-debugDescription`
1626 * to call `[self propertiesForDebugDescription]` and use `ASObjectDescriptionMake`
Original file line number Diff line number Diff line change @@ -89,11 +89,6 @@ ASDISPLAYNODE_EXTERN_C_END
8989 */
9090- (nullable NSArray <id<ASLayoutElement>> *)sublayoutElements ;
9191
92- /* *
93- * @abstract Optional name that is printed by ascii art string and displayed in description.
94- */
95- @property (nullable , nonatomic , copy ) NSString *debugName;
96-
9792#pragma mark - Calculate layout
9893
9994/* *
Original file line number Diff line number Diff line change 1010
1111#import < AsyncDisplayKit/ASLayoutElement.h>
1212#import < AsyncDisplayKit/ASAsciiArtBoxCreator.h>
13+ #import < AsyncDisplayKit/ASObjectDescriptionHelpers.h>
1314
1415NS_ASSUME_NONNULL_BEGIN
1516
@@ -91,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
9192
9293@end
9394
94- @interface ASLayoutSpec (Debugging) <ASLayoutElementAsciiArtProtocol>
95+ @interface ASLayoutSpec (Debugging) <ASLayoutElementAsciiArtProtocol, ASDebugNameProvider >
9596/* *
9697 * Used by other layout specs to create ascii art debug strings
9798 */
You can’t perform that action at this time.
0 commit comments