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:
committed by
Facebook Github Bot
parent
7b87ded288
commit
9fe20fd2fc
@@ -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.
|
||||
|
Reference in New Issue
Block a user