Also ban +new on YGLayout

Summary: `-init` is marked unavailable, but `+new` does the same thing and is not.

Reviewed By: dshahidehpour

Differential Revision: D8957391

fbshipit-source-id: 42fcfe845db79726d8724efd9f6a4d37c19938ad
This commit is contained in:
Nate Stedman
2018-07-24 06:47:20 -07:00
committed by Facebook Github Bot
parent 7b87ded288
commit 9fe20fd2fc

View File

@@ -33,6 +33,13 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
- (instancetype)init - (instancetype)init
__attribute__((unavailable("you are not meant to initialise YGLayout"))); __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 The property that decides if we should include this view when calculating
layout. Defaults to YES. layout. Defaults to YES.