-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathASDisplayNode+Yoga2.h
More file actions
47 lines (34 loc) · 941 Bytes
/
ASDisplayNode+Yoga2.h
File metadata and controls
47 lines (34 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// ASDisplayNode+Yoga2.h
// AsyncDisplayKit
//
// Created by Adlai Holler on 3/8/19.
// Copyright © 2019 Pinterest. All rights reserved.
//
#if defined(__cplusplus)
#import <AsyncDisplayKit/AsyncDisplayKit.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <UIKit/UIKit.h>
#if YOGA
#import YOGA_HEADER_PATH
#endif
NS_ASSUME_NONNULL_BEGIN
namespace AS {
namespace Yoga2 {
/**
* Returns whether Yoga2 is enabled for this node.
*/
bool GetEnabled(ASDisplayNode *node);
inline void AssertEnabled() {
ASDisplayNodeCAssert(false, @"Expected Yoga2 to be enabled.");
}
inline void AssertEnabled(ASDisplayNode *node) {
ASDisplayNodeCAssert(GetEnabled(node), @"Expected Yoga2 to be enabled.");
}
inline void AssertDisabled(ASDisplayNode *node) {
ASDisplayNodeCAssert(!GetEnabled(node), @"Expected Yoga2 to be disabled.");
}
} // namespace Yoga2
} // namespace AS
NS_ASSUME_NONNULL_END
#endif // defined(__cplusplus)