Summary: This change applies all Arcanist recommended lint changes, which amounts to changing copyright headers and some cases of whitespace changes. Reviewed By: yungsters Differential Revision: D40060899 fbshipit-source-id: b62f9472e6ef58a3fc3d22eed661578a2635cb1f
38 lines
977 B
Objective-C
38 lines
977 B
Objective-C
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import "YGLayout.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
typedef void (^YGLayoutConfigurationBlock)(YGLayout* layout);
|
|
|
|
@interface UIView (Yoga)
|
|
|
|
/**
|
|
The YGLayout that is attached to this view. It is lazily created.
|
|
*/
|
|
@property(nonatomic, readonly, strong) YGLayout* yoga;
|
|
/**
|
|
Indicates whether or not Yoga is enabled
|
|
*/
|
|
@property(nonatomic, readonly, assign) BOOL isYogaEnabled;
|
|
|
|
/**
|
|
In ObjC land, every time you access `view.yoga.*` you are adding another
|
|
`objc_msgSend` to your code. If you plan on making multiple changes to
|
|
YGLayout, it's more performant to use this method, which uses a single
|
|
objc_msgSend call.
|
|
*/
|
|
- (void)configureLayoutWithBlock:(YGLayoutConfigurationBlock)block
|
|
NS_SWIFT_NAME(configureLayout(block:));
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|