Summary: When trying to integrate this into an Xcode project that already included CSSLayout.[c|h], we were getting a linker error. Upon digging in, I found out that Xcode was becoming confused because the imports of the uikit library and the c library are both `#import <CSSLayout/CSSLayout.h>`. So, it needed a new name. Reviewed By: emilsjolander Differential Revision: D4162621 fbshipit-source-id: b5f7624eb29f1b9eaebbed5104ec9ea8a12ad2e5
52 lines
1.8 KiB
Objective-C
52 lines
1.8 KiB
Objective-C
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <CSSLayout/CSSLayout.h>
|
|
|
|
@interface UIView (CSSLayout)
|
|
|
|
- (void)css_setUsesFlexbox:(BOOL)enabled;
|
|
- (BOOL)css_usesFlexbox;
|
|
|
|
- (void)css_setDirection:(CSSDirection)direction;
|
|
- (void)css_setFlexDirection:(CSSFlexDirection)flexDirection;
|
|
- (void)css_setJustifyContent:(CSSJustify)justifyContent;
|
|
- (void)css_setAlignContent:(CSSAlign)alignContent;
|
|
- (void)css_setAlignItems:(CSSAlign)alignItems;
|
|
- (void)css_setAlignSelf:(CSSAlign)alignSelf;
|
|
- (void)css_setPositionType:(CSSPositionType)positionType;
|
|
- (void)css_setFlexWrap:(CSSWrapType)flexWrap;
|
|
|
|
- (void)css_setFlexGrow:(CGFloat)flexGrow;
|
|
- (void)css_setFlexShrink:(CGFloat)flexShrink;
|
|
- (void)css_setFlexBasis:(CGFloat)flexBasis;
|
|
|
|
- (void)css_setPosition:(CGFloat)position forEdge:(CSSEdge)edge;
|
|
- (void)css_setMargin:(CGFloat)margin forEdge:(CSSEdge)edge;
|
|
- (void)css_setPadding:(CGFloat)padding forEdge:(CSSEdge)edge;
|
|
|
|
- (void)css_setWidth:(CGFloat)width;
|
|
- (void)css_setHeight:(CGFloat)height;
|
|
- (void)css_setMinWidth:(CGFloat)minWidth;
|
|
- (void)css_setMinHeight:(CGFloat)minHeight;
|
|
- (void)css_setMaxWidth:(CGFloat)maxWidth;
|
|
- (void)css_setMaxHeight:(CGFloat)maxHeight;
|
|
|
|
// Get the resolved direction of this node. This won't be CSSDirectionInherit
|
|
- (CSSDirection)css_resolvedDirection;
|
|
|
|
//! @abstract Perform a layout calculation and update the frames of the views in the hierarchy with th results
|
|
- (void)css_applyLayout;
|
|
|
|
//! @abstract Compute the size of a layout with a constrained size.
|
|
- (CGSize)css_sizeThatFits:(CGSize)constrainedSize;
|
|
|
|
@end
|