diff --git a/YogaKit/Source/YGLayout.h b/YogaKit/Source/YGLayout.h index 05d54a16..037d3026 100644 --- a/YogaKit/Source/YGLayout.h +++ b/YogaKit/Source/YGLayout.h @@ -29,7 +29,15 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) { @interface YGLayout : NSObject /** - The property that decides if we should include this view when calculating layout. Defaults to YES. + Make default init unavailable, as it will not initialise YGNode which is + required for the setters and getters of YGLayout's properties to work properly. +*/ +- (instancetype)init + __attribute__((unavailable("you are not meant to initialise YGLayout"))); + +/** + The property that decides if we should include this view when calculating + layout. Defaults to YES. */ @property (nonatomic, readwrite, assign, setter=setIncludedInLayout:) BOOL isIncludedInLayout;