diff --git a/YogaKit/Source/YGLayout.h b/YogaKit/Source/YGLayout.h index 7b9d583a..3bfb1b89 100644 --- a/YogaKit/Source/YGLayout.h +++ b/YogaKit/Source/YGLayout.h @@ -33,6 +33,13 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) { - (instancetype)init __attribute__((unavailable("you are not meant to initialise YGLayout"))); +/** + 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)new + __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.