[YogaKit] support macOS, tvOS, Carthage; auto apply layout like AutoLayout. #1026
10
Yoga.podspec
10
Yoga.podspec
@@ -5,7 +5,7 @@
|
||||
|
||||
Pod::Spec.new do |spec|
|
||||
spec.name = 'Yoga'
|
||||
spec.version = '1.14.0'
|
||||
spec.version = '1.14.1'
|
||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||
spec.homepage = 'https://yogalayout.com/'
|
||||
spec.documentation_url = 'https://yogalayout.com/docs'
|
||||
@@ -18,8 +18,8 @@ Pod::Spec.new do |spec|
|
||||
:git => 'https://github.com/facebook/yoga.git',
|
||||
:tag => spec.version.to_s,
|
||||
}
|
||||
spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" }
|
||||
spec.module_name = 'yoga'
|
||||
spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "9.0", :watchos => "2.0" }
|
||||
spec.module_name = 'Yoga'
|
||||
spec.requires_arc = false
|
||||
spec.pod_target_xcconfig = {
|
||||
'DEFINES_MODULE' => 'YES'
|
||||
@@ -33,6 +33,6 @@ Pod::Spec.new do |spec|
|
||||
'-fPIC'
|
||||
]
|
||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGNode,YGStyle,YGValue}.h'
|
||||
|
||||
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
|
||||
spec.static_framework = true
|
||||
end
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
podspec = Pod::Spec.new do |spec|
|
||||
spec.name = 'YogaKit'
|
||||
spec.version = '1.18.1'
|
||||
spec.version = '1.18.2'
|
||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/'
|
||||
@@ -19,19 +19,18 @@ podspec = Pod::Spec.new do |spec|
|
||||
:tag => "1.18.0",
|
||||
}
|
||||
|
||||
spec.platform = :ios
|
||||
spec.ios.deployment_target = '8.0'
|
||||
spec.ios.frameworks = 'UIKit'
|
||||
spec.platforms = { :ios => "8.0", :osx => "10.9", :tvos => "9.0" }
|
||||
spec.module_name = 'YogaKit'
|
||||
spec.dependency 'Yoga', '~> 1.14'
|
||||
spec.dependency 'Yoga', '~> 1.14.1'
|
||||
# Fixes the bug related the xcode 11 not able to find swift related frameworks.
|
||||
# https://github.com/Carthage/Carthage/issues/2825
|
||||
# https://twitter.com/krzyzanowskim/status/1151549874653081601?s=21
|
||||
spec.pod_target_xcconfig = {"LD_VERIFY_BITCODE": "NO"}
|
||||
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
||||
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
||||
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga,YogaKit}.h'
|
||||
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
||||
spec.swift_version = '5.1'
|
||||
spec.static_framework = true
|
||||
end
|
||||
|
||||
# See https://github.com/facebook/yoga/pull/366
|
||||
|
1
YogaKit.xcodeproj
Symbolic link
1
YogaKit.xcodeproj
Symbolic link
@@ -0,0 +1 @@
|
||||
YogaKit/YogaKit.xcodeproj
|
@@ -5,7 +5,6 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YGLayout.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@@ -34,4 +33,9 @@ typedef void (^YGLayoutConfigurationBlock)(YGLayout* layout);
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface UIView (YogaKitAutoApplyLayout)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -35,3 +35,116 @@ static const void* kYGYogaAssociatedKey = &kYGYogaAssociatedKey;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
static const void* kYGBoundsSizeAssociatedKey = &kYGBoundsSizeAssociatedKey;
|
||||
static void YogaSwizzleInstanceMethod(Class cls, SEL originalSelector, SEL swizzledSelector);
|
||||
|
||||
@implementation UIView (YogaKitAutoApplyLayout)
|
||||
|
||||
+ (void)load {
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
YogaSwizzleInstanceMethod(self, @selector(initWithFrame:), @selector(_yoga_initWithFrame:));
|
||||
YogaSwizzleInstanceMethod(self, @selector(setFrame:), @selector(_yoga_setFrame:));
|
||||
YogaSwizzleInstanceMethod(self, @selector(setBounds:), @selector(_yoga_setBounds:));
|
||||
#if TARGET_OS_OSX
|
||||
YogaSwizzleInstanceMethod(self, @selector(setFrameSize:), @selector(_yoga_setFrameSize:));
|
||||
YogaSwizzleInstanceMethod(self, @selector(setBoundsSize:), @selector(_yoga_setBoundsSize:));
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
- (CGSize)_yoga_boundsSize {
|
||||
NSValue *value = (NSValue *)objc_getAssociatedObject(self, kYGBoundsSizeAssociatedKey);
|
||||
|
||||
return value ?
|
||||
#if TARGET_OS_OSX
|
||||
value.sizeValue
|
||||
#else
|
||||
value.CGSizeValue
|
||||
#endif
|
||||
: CGSizeMake(YGUndefined, YGUndefined);
|
||||
}
|
||||
|
||||
- (void)set_yoga_boundsSize:(CGSize)size {
|
||||
objc_setAssociatedObject(self,
|
||||
kYGBoundsSizeAssociatedKey,
|
||||
#if TARGET_OS_OSX
|
||||
[NSValue valueWithSize:size]
|
||||
#else
|
||||
[NSValue valueWithCGSize:size]
|
||||
#endif
|
||||
, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
}
|
||||
|
||||
- (instancetype)_yoga_initWithFrame:(CGRect)frame {
|
||||
id _self = [self _yoga_initWithFrame:frame];
|
||||
if (_self) {
|
||||
[self _yoga_applyLayout];
|
||||
}
|
||||
|
||||
return _self;
|
||||
}
|
||||
|
||||
- (void)_yoga_setFrame:(CGRect)frame {
|
||||
[self _yoga_setFrame:frame];
|
||||
|
||||
[self _yoga_applyLayout];
|
||||
}
|
||||
|
||||
- (void)_yoga_setBounds:(CGRect)bounds {
|
||||
[self _yoga_setBounds:bounds];
|
||||
|
||||
[self _yoga_applyLayout];
|
||||
}
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
- (void)_yoga_setFrameSize:(NSSize)newSize {
|
||||
[self _yoga_setFrameSize:newSize];
|
||||
|
||||
[self _yoga_applyLayout];
|
||||
}
|
||||
|
||||
- (void)_yoga_setBoundsSize:(NSSize)newSize {
|
||||
[self _yoga_setBoundsSize:newSize];
|
||||
|
||||
[self _yoga_applyLayout];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)_yoga_applyLayout {
|
||||
if (self.isYogaEnabled && self.yoga.isEnabled) {
|
||||
CGSize size = self.bounds.size;
|
||||
CGSize prev = self._yoga_boundsSize;
|
||||
if (!CGSizeEqualToSize(size, prev)) {
|
||||
self._yoga_boundsSize = size;
|
||||
[self.yoga applyLayoutPreservingOrigin:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
static void YogaSwizzleInstanceMethod(Class cls, SEL originalSelector, SEL swizzledSelector) {
|
||||
if (!cls || !originalSelector || !swizzledSelector) {
|
||||
return;
|
||||
}
|
||||
|
||||
Method originalMethod = class_getInstanceMethod(cls, originalSelector);
|
||||
Method swizzledMethod = class_getInstanceMethod(cls, swizzledSelector);
|
||||
if (!originalMethod || !swizzledMethod) {
|
||||
return;
|
||||
}
|
||||
|
||||
IMP swizzledIMP = method_getImplementation(swizzledMethod);
|
||||
if (class_addMethod(cls, originalSelector, swizzledIMP, method_getTypeEncoding(swizzledMethod))) {
|
||||
class_replaceMethod(cls,
|
||||
swizzledSelector,
|
||||
method_getImplementation(originalMethod),
|
||||
method_getTypeEncoding(originalMethod));
|
||||
} else {
|
||||
method_exchangeImplementations(originalMethod, swizzledMethod);
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,14 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <TargetConditionals.h>
|
||||
#if TARGET_OS_OSX
|
||||
#import <AppKit/AppKit.h>
|
||||
#define UIView NSView
|
||||
#else
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
||||
|
||||
#import <yoga/YGEnums.h>
|
||||
#import <yoga/YGMacros.h>
|
||||
#import <yoga/Yoga.h>
|
||||
|
@@ -149,19 +149,44 @@
|
||||
lowercased_name, capitalized_name, capitalized_name, YGEdgeAll)
|
||||
|
||||
YGValue YGPointValue(CGFloat value) {
|
||||
return (YGValue){.value = value, .unit = YGUnitPoint};
|
||||
return (YGValue){.value = (YGFloat)value, .unit = YGUnitPoint};
|
||||
}
|
||||
|
||||
YGValue YGPercentValue(CGFloat value) {
|
||||
return (YGValue){.value = value, .unit = YGUnitPercent};
|
||||
return (YGValue){.value = (YGFloat)value, .unit = YGUnitPercent};
|
||||
}
|
||||
|
||||
static YGConfigRef globalConfig;
|
||||
static CGFloat YGScaleFactor() {
|
||||
static CGFloat scale;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^() {
|
||||
#if TARGET_OS_OSX
|
||||
scale = [NSScreen mainScreen].backingScaleFactor;
|
||||
#else
|
||||
scale = [UIScreen mainScreen].scale;
|
||||
#endif
|
||||
});
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
static YGConfigRef YGGlobalConfig() {
|
||||
static YGConfigRef globalConfig;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^() {
|
||||
globalConfig = YGConfigNew();
|
||||
YGConfigSetExperimentalFeatureEnabled(globalConfig, YGExperimentalFeatureWebFlexBasis, true);
|
||||
YGConfigSetPointScaleFactor(globalConfig, YGScaleFactor());
|
||||
});
|
||||
|
||||
return globalConfig;
|
||||
}
|
||||
|
||||
@interface YGLayout ()
|
||||
|
||||
@property(nonatomic, weak, readonly) UIView* view;
|
||||
@property(nonatomic, assign, readonly) BOOL isUIView;
|
||||
@property(nonatomic, assign) BOOL isApplingLayout;
|
||||
|
||||
@end
|
||||
|
||||
@@ -171,17 +196,10 @@ static YGConfigRef globalConfig;
|
||||
@synthesize isIncludedInLayout = _isIncludedInLayout;
|
||||
@synthesize node = _node;
|
||||
|
||||
+ (void)initialize {
|
||||
globalConfig = YGConfigNew();
|
||||
YGConfigSetExperimentalFeatureEnabled(
|
||||
globalConfig, YGExperimentalFeatureWebFlexBasis, true);
|
||||
YGConfigSetPointScaleFactor(globalConfig, [UIScreen mainScreen].scale);
|
||||
}
|
||||
|
||||
- (instancetype)initWithView:(UIView*)view {
|
||||
if (self = [super init]) {
|
||||
_view = view;
|
||||
_node = YGNodeNewWithConfig(globalConfig);
|
||||
_node = YGNodeNewWithConfig(YGGlobalConfig());
|
||||
YGNodeSetContext(_node, (__bridge void*)view);
|
||||
_isEnabled = NO;
|
||||
_isIncludedInLayout = YES;
|
||||
@@ -225,9 +243,11 @@ static YGConfigRef globalConfig;
|
||||
@"This method must be called on the main thread.");
|
||||
if (self.isEnabled) {
|
||||
for (UIView* subview in self.view.subviews) {
|
||||
YGLayout* const yoga = subview.yoga;
|
||||
if (yoga.isEnabled && yoga.isIncludedInLayout) {
|
||||
return NO;
|
||||
if (subview.isYogaEnabled) {
|
||||
YGLayout* const yoga = subview.yoga;
|
||||
if (yoga.isEnabled && yoga.isIncludedInLayout) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,11 +312,19 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
}
|
||||
|
||||
- (void)applyLayout {
|
||||
if (self.isApplingLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self calculateLayoutWithSize:self.view.bounds.size];
|
||||
YGApplyLayoutToViewHierarchy(self.view, NO);
|
||||
}
|
||||
|
||||
- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin {
|
||||
if (self.isApplingLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self calculateLayoutWithSize:self.view.bounds.size];
|
||||
YGApplyLayoutToViewHierarchy(self.view, preserveOrigin);
|
||||
}
|
||||
@@ -304,6 +332,10 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin
|
||||
dimensionFlexibility:
|
||||
(YGDimensionFlexibility)dimensionFlexibility {
|
||||
if (self.isApplingLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
CGSize size = self.view.bounds.size;
|
||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleWidth) {
|
||||
size.width = YGUndefined;
|
||||
@@ -343,9 +375,9 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
|
||||
static YGSize YGMeasureView(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
const CGFloat constrainedWidth =
|
||||
(widthMode == YGMeasureModeUndefined) ? CGFLOAT_MAX : width;
|
||||
@@ -362,16 +394,24 @@ static YGSize YGMeasureView(
|
||||
//
|
||||
// See https://github.com/facebook/yoga/issues/606 for more information.
|
||||
if (!view.yoga.isUIView || [view.subviews count] > 0) {
|
||||
#if TARGET_OS_OSX
|
||||
CGSize fittingSize = view.fittingSize;
|
||||
sizeThatFits = (CGSize){
|
||||
.width = MIN(constrainedWidth, fittingSize.width),
|
||||
.height = MIN(constrainedHeight, fittingSize.height)
|
||||
};
|
||||
#else
|
||||
sizeThatFits = [view sizeThatFits:(CGSize){
|
||||
.width = constrainedWidth,
|
||||
.height = constrainedHeight,
|
||||
}];
|
||||
#endif
|
||||
}
|
||||
|
||||
return (YGSize){
|
||||
.width = YGSanitizeMeasurement(
|
||||
.width = (YGFloat)YGSanitizeMeasurement(
|
||||
constrainedWidth, sizeThatFits.width, widthMode),
|
||||
.height = YGSanitizeMeasurement(
|
||||
.height = (YGFloat)YGSanitizeMeasurement(
|
||||
constrainedHeight, sizeThatFits.height, heightMode),
|
||||
};
|
||||
}
|
||||
@@ -422,7 +462,7 @@ static void YGAttachNodesFromViewHierachy(UIView* const view) {
|
||||
NSMutableArray<UIView*>* subviewsToInclude =
|
||||
[[NSMutableArray alloc] initWithCapacity:view.subviews.count];
|
||||
for (UIView* subview in view.subviews) {
|
||||
if (subview.yoga.isEnabled && subview.yoga.isIncludedInLayout) {
|
||||
if (subview.isYogaEnabled && subview.yoga.isEnabled && subview.yoga.isIncludedInLayout) {
|
||||
[subviewsToInclude addObject:subview];
|
||||
}
|
||||
}
|
||||
@@ -448,14 +488,9 @@ static void YGRemoveAllChildren(const YGNodeRef node) {
|
||||
YGNodeRemoveAllChildren(node);
|
||||
}
|
||||
|
||||
static CGFloat YGRoundPixelValue(CGFloat value) {
|
||||
static CGFloat scale;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^() {
|
||||
scale = [UIScreen mainScreen].scale;
|
||||
});
|
||||
|
||||
return roundf(value * scale) / scale;
|
||||
static inline CGSize YGAlignPixelSize(CGSize s) {
|
||||
CGFloat scale = YGScaleFactor();
|
||||
return (CGSize) { .width = ceil(s.width * scale) / scale, .height = ceil(s.height * scale) / scale };
|
||||
}
|
||||
|
||||
static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) {
|
||||
@@ -463,44 +498,78 @@ static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) {
|
||||
[NSThread isMainThread],
|
||||
@"Framesetting should only be done on the main thread.");
|
||||
|
||||
if (!view.isYogaEnabled || !view.yoga.isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const YGLayout* yoga = view.yoga;
|
||||
|
||||
if (yoga.isApplingLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!yoga.isIncludedInLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
yoga.isApplingLayout = YES;
|
||||
|
||||
YGNodeRef node = yoga.node;
|
||||
const CGPoint topLeft = {
|
||||
YGNodeLayoutGetLeft(node),
|
||||
YGNodeLayoutGetTop(node),
|
||||
};
|
||||
|
||||
const CGPoint topLeft = (view.superview.isYogaEnabled && view.superview.yoga.isEnabled) ? (CGPoint) {
|
||||
.x = YGNodeLayoutGetLeft(node),
|
||||
.y = YGNodeLayoutGetTop(node)
|
||||
} : CGPointZero;
|
||||
|
||||
const CGPoint bottomRight = {
|
||||
topLeft.x + YGNodeLayoutGetWidth(node),
|
||||
topLeft.y + YGNodeLayoutGetHeight(node),
|
||||
.x = (CGFloat)(topLeft.x + YGNodeLayoutGetWidth(node)),
|
||||
.y = (CGFloat)(topLeft.y + YGNodeLayoutGetHeight(node)),
|
||||
};
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
const CGPoint origin = preserveOrigin ? view.frame.origin : CGPointZero;
|
||||
view.frame = (CGRect){
|
||||
.origin =
|
||||
{
|
||||
.x = YGRoundPixelValue(topLeft.x + origin.x),
|
||||
.y = YGRoundPixelValue(topLeft.y + origin.y),
|
||||
},
|
||||
.size =
|
||||
{
|
||||
.width = YGRoundPixelValue(bottomRight.x) -
|
||||
YGRoundPixelValue(topLeft.x),
|
||||
.height = YGRoundPixelValue(bottomRight.y) -
|
||||
YGRoundPixelValue(topLeft.y),
|
||||
},
|
||||
#else
|
||||
// use bounds/center and not frame if non-identity transform.
|
||||
const CGPoint origin = preserveOrigin ? (CGPoint) {
|
||||
.x = (CGFloat)(view.center.x - CGRectGetWidth(view.bounds) * 0.5),
|
||||
.y = (CGFloat)(view.center.y - CGRectGetHeight(view.bounds) * 0.5)
|
||||
}
|
||||
: CGPointZero;
|
||||
#endif
|
||||
|
||||
CGRect frame = (CGRect) {
|
||||
.origin = (CGPoint) { .x = topLeft.x + origin.x, .y = topLeft.y + origin.y, },
|
||||
.size = (CGSize) { .width = MAX(bottomRight.x - topLeft.x, 0), .height = MAX(bottomRight.y - topLeft.y, 0), }
|
||||
};
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
if (!view.superview.isFlipped && view.superview.isYogaEnabled && view.superview.yoga.isEnabled) {
|
||||
frame.origin.y = (CGFloat)(YGNodeLayoutGetHeight(view.superview.yoga.node) - CGRectGetMaxY(frame));
|
||||
}
|
||||
|
||||
view.frame = (CGRect) {
|
||||
.origin = frame.origin,
|
||||
.size = YGAlignPixelSize(frame.size)
|
||||
};
|
||||
#else
|
||||
view.bounds = (CGRect) {
|
||||
.origin = view.bounds.origin,
|
||||
.size = YGAlignPixelSize(frame.size)
|
||||
};
|
||||
|
||||
view.center = (CGPoint) {
|
||||
.x = CGRectGetMidX(frame),
|
||||
.y = CGRectGetMidY(frame)
|
||||
};
|
||||
#endif
|
||||
|
||||
if (!yoga.isLeaf) {
|
||||
for (NSUInteger i = 0; i < view.subviews.count; i++) {
|
||||
YGApplyLayoutToViewHierarchy(view.subviews[i], NO);
|
||||
}
|
||||
}
|
||||
|
||||
yoga.isApplingLayout = NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -5,41 +5,41 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import yoga;
|
||||
import Yoga
|
||||
postfix operator %
|
||||
|
||||
extension Int {
|
||||
public static postfix func %(value: Int) -> YGValue {
|
||||
return YGValue(value: Float(value), unit: .percent)
|
||||
return YGValue(value: YGFloat(value), unit: .percent)
|
||||
}
|
||||
}
|
||||
|
||||
extension Float {
|
||||
public static postfix func %(value: Float) -> YGValue {
|
||||
return YGValue(value: value, unit: .percent)
|
||||
return YGValue(value: YGFloat(value), unit: .percent)
|
||||
}
|
||||
}
|
||||
|
||||
extension CGFloat {
|
||||
public static postfix func %(value: CGFloat) -> YGValue {
|
||||
return YGValue(value: Float(value), unit: .percent)
|
||||
return YGValue(value: YGFloat(value), unit: .percent)
|
||||
}
|
||||
}
|
||||
|
||||
extension YGValue : ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral {
|
||||
public init(integerLiteral value: Int) {
|
||||
self = YGValue(value: Float(value), unit: .point)
|
||||
self = YGValue(value: YGFloat(value), unit: .point)
|
||||
}
|
||||
|
||||
public init(floatLiteral value: Float) {
|
||||
self = YGValue(value: value, unit: .point)
|
||||
self = YGValue(value: YGFloat(value), unit: .point)
|
||||
}
|
||||
|
||||
public init(_ value: Float) {
|
||||
self = YGValue(value: value, unit: .point)
|
||||
self = YGValue(value: YGFloat(value), unit: .point)
|
||||
}
|
||||
|
||||
public init(_ value: CGFloat) {
|
||||
self = YGValue(value: Float(value), unit: .point)
|
||||
self = YGValue(value: YGFloat(value), unit: .point)
|
||||
}
|
||||
}
|
||||
|
10
YogaKit/Source/YogaKit.h
Normal file
10
YogaKit/Source/YogaKit.h
Normal file
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// YogaKit.h
|
||||
// YogaKit
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YGLayout.h"
|
||||
#import "UIView+Yoga.h"
|
@@ -3,19 +3,19 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.facebook.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
|
@@ -265,16 +265,28 @@
|
||||
subview1.yoga.flexGrow = 1;
|
||||
[container addSubview:subview1];
|
||||
|
||||
UIView *leafView = [[UIView alloc] init];
|
||||
leafView.yoga.isEnabled = YES;
|
||||
[subview1 addSubview:leafView];
|
||||
|
||||
UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
subview2.yoga.isEnabled = YES;
|
||||
subview2.yoga.flexGrow = 1;
|
||||
[container addSubview:subview2];
|
||||
|
||||
leafView = [[UIView alloc] init];
|
||||
leafView.yoga.isEnabled = YES;
|
||||
[subview2 addSubview:leafView];
|
||||
|
||||
UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
subview3.yoga.isEnabled = YES;
|
||||
subview3.yoga.flexGrow = 1;
|
||||
[container addSubview:subview3];
|
||||
|
||||
leafView = [[UIView alloc] init];
|
||||
leafView.yoga.isEnabled = YES;
|
||||
[subview3 addSubview:leafView];
|
||||
|
||||
[container.yoga applyLayoutPreservingOrigin:YES];
|
||||
|
||||
XCTAssertEqualWithAccuracy(
|
||||
|
2
YogaKit/Tests/dummy.swift
Normal file
2
YogaKit/Tests/dummy.swift
Normal file
@@ -0,0 +1,2 @@
|
||||
class YogaKitTestsDummy {
|
||||
}
|
9
YogaKit/Yoga-umbrella.h
Normal file
9
YogaKit/Yoga-umbrella.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifdef __OBJC__
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#import "YGEnums.h"
|
||||
#import "YGMacros.h"
|
||||
#import "YGValue.h"
|
||||
#import "Yoga.h"
|
6
YogaKit/Yoga.modulemap
Normal file
6
YogaKit/Yoga.modulemap
Normal file
@@ -0,0 +1,6 @@
|
||||
framework module Yoga [system][extern_c] {
|
||||
umbrella header "Yoga-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
826
YogaKit/YogaKit.xcodeproj/project.pbxproj
Normal file
826
YogaKit/YogaKit.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,826 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 52;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
153B526524E6AD8D008156D3 /* YogaKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 153B526324E6AD8D008156D3 /* YogaKitTests.m */; };
|
||||
153B526B24E6ADFA008156D3 /* Yoga.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15865FFE24E58BD800345BD7 /* Yoga.framework */; platformFilter = ios; };
|
||||
153B526C24E6ADFA008156D3 /* YogaKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15865F5424E5834E00345BD7 /* YogaKit.framework */; platformFilter = ios; };
|
||||
153B526E24E6AECF008156D3 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 153B526D24E6AECF008156D3 /* libc++.tbd */; platformFilter = ios; };
|
||||
153D326F24E654A300EDDBEA /* Yoga-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 153D326E24E6549A00EDDBEA /* Yoga-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
153D327124E654EF00EDDBEA /* YGLayoutExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 153D327024E654EF00EDDBEA /* YGLayoutExtensions.swift */; };
|
||||
154A6EF524E6B1260091264C /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154A6EF424E6B1260091264C /* dummy.swift */; };
|
||||
15865F6624E583F000345BD7 /* YGLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 15865F5F24E583F000345BD7 /* YGLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
15865F6724E583F000345BD7 /* UIView+Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 15865F6024E583F000345BD7 /* UIView+Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
15865F6824E583F000345BD7 /* YGLayout+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 15865F6124E583F000345BD7 /* YGLayout+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
15865F6924E583F000345BD7 /* YGLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 15865F6224E583F000345BD7 /* YGLayout.m */; };
|
||||
15865F6A24E583F000345BD7 /* UIView+Yoga.m in Sources */ = {isa = PBXBuildFile; fileRef = 15865F6324E583F000345BD7 /* UIView+Yoga.m */; };
|
||||
15865F6C24E583F000345BD7 /* YogaKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 15865F6524E583F000345BD7 /* YogaKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1586600824E58C0F00345BD7 /* Yoga.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15865FFE24E58BD800345BD7 /* Yoga.framework */; };
|
||||
1586602924E58C3700345BD7 /* Utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586600924E58C3600345BD7 /* Utils.cpp */; };
|
||||
1586602A24E58C3700345BD7 /* experiments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586600B24E58C3600345BD7 /* experiments.cpp */; };
|
||||
1586602B24E58C3700345BD7 /* experiments-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586600C24E58C3600345BD7 /* experiments-inl.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586602C24E58C3700345BD7 /* experiments.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586600D24E58C3600345BD7 /* experiments.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586602D24E58C3700345BD7 /* YGStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586600E24E58C3600345BD7 /* YGStyle.cpp */; };
|
||||
1586602E24E58C3700345BD7 /* YGNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586600F24E58C3600345BD7 /* YGNode.cpp */; };
|
||||
1586602F24E58C3700345BD7 /* YGConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586601024E58C3600345BD7 /* YGConfig.cpp */; };
|
||||
1586603024E58C3700345BD7 /* Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601124E58C3600345BD7 /* Utils.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603124E58C3700345BD7 /* BitUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601224E58C3600345BD7 /* BitUtils.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603224E58C3700345BD7 /* CompactValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601324E58C3600345BD7 /* CompactValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603324E58C3700345BD7 /* YGValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586601424E58C3700345BD7 /* YGValue.cpp */; };
|
||||
1586603424E58C3700345BD7 /* YGLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586601524E58C3700345BD7 /* YGLayout.cpp */; };
|
||||
1586603524E58C3700345BD7 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601624E58C3700345BD7 /* log.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603624E58C3700345BD7 /* YGNodePrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586601724E58C3700345BD7 /* YGNodePrint.cpp */; };
|
||||
1586603724E58C3700345BD7 /* event.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601924E58C3700345BD7 /* event.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603824E58C3700345BD7 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586601A24E58C3700345BD7 /* event.cpp */; };
|
||||
1586603924E58C3700345BD7 /* YGNodePrint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601B24E58C3700345BD7 /* YGNodePrint.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603A24E58C3700345BD7 /* Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601C24E58C3700345BD7 /* Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1586603B24E58C3700345BD7 /* YGFloatOptional.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601D24E58C3700345BD7 /* YGFloatOptional.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603C24E58C3700345BD7 /* YGConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601E24E58C3700345BD7 /* YGConfig.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586603D24E58C3700345BD7 /* YGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586601F24E58C3700345BD7 /* YGMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1586603E24E58C3700345BD7 /* YGEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602024E58C3700345BD7 /* YGEnums.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1586603F24E58C3700345BD7 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586602124E58C3700345BD7 /* log.cpp */; };
|
||||
1586604024E58C3700345BD7 /* YGStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602224E58C3700345BD7 /* YGStyle.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586604124E58C3700345BD7 /* Yoga.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586602324E58C3700345BD7 /* Yoga.cpp */; };
|
||||
1586604224E58C3700345BD7 /* Yoga-internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602424E58C3700345BD7 /* Yoga-internal.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586604324E58C3700345BD7 /* YGValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602524E58C3700345BD7 /* YGValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1586604424E58C3700345BD7 /* YGLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602624E58C3700345BD7 /* YGLayout.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586604524E58C3700345BD7 /* YGNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1586602724E58C3700345BD7 /* YGNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
1586604624E58C3700345BD7 /* YGEnums.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1586602824E58C3700345BD7 /* YGEnums.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
153B526724E6ADF4008156D3 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 15865F4B24E5834E00345BD7 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 15865FFD24E58BD800345BD7;
|
||||
remoteInfo = Yoga;
|
||||
};
|
||||
153B526924E6ADF4008156D3 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 15865F4B24E5834E00345BD7 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 15865F5324E5834E00345BD7;
|
||||
remoteInfo = YogaKit;
|
||||
};
|
||||
1586600624E58C0900345BD7 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 15865F4B24E5834E00345BD7 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 15865FFD24E58BD800345BD7;
|
||||
remoteInfo = Yoga;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
153B525B24E6AD6B008156D3 /* YogaKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YogaKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
153B526324E6AD8D008156D3 /* YogaKitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YogaKitTests.m; path = Tests/YogaKitTests.m; sourceTree = SOURCE_ROOT; };
|
||||
153B526424E6AD8D008156D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = Tests/Info.plist; sourceTree = SOURCE_ROOT; };
|
||||
153B526D24E6AECF008156D3 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
|
||||
153D326D24E6549A00EDDBEA /* Yoga.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Yoga.modulemap; sourceTree = "<group>"; };
|
||||
153D326E24E6549A00EDDBEA /* Yoga-umbrella.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Yoga-umbrella.h"; sourceTree = "<group>"; };
|
||||
153D327024E654EF00EDDBEA /* YGLayoutExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YGLayoutExtensions.swift; sourceTree = "<group>"; };
|
||||
154A6EF424E6B1260091264C /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = dummy.swift; path = Tests/dummy.swift; sourceTree = SOURCE_ROOT; };
|
||||
15865F5424E5834E00345BD7 /* YogaKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = YogaKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
15865F5F24E583F000345BD7 /* YGLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGLayout.h; sourceTree = "<group>"; };
|
||||
15865F6024E583F000345BD7 /* UIView+Yoga.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Yoga.h"; sourceTree = "<group>"; };
|
||||
15865F6124E583F000345BD7 /* YGLayout+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "YGLayout+Private.h"; sourceTree = "<group>"; };
|
||||
15865F6224E583F000345BD7 /* YGLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YGLayout.m; sourceTree = "<group>"; };
|
||||
15865F6324E583F000345BD7 /* UIView+Yoga.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Yoga.m"; sourceTree = "<group>"; };
|
||||
15865F6524E583F000345BD7 /* YogaKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YogaKit.h; sourceTree = "<group>"; };
|
||||
15865FFE24E58BD800345BD7 /* Yoga.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Yoga.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1586600924E58C3600345BD7 /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Utils.cpp; sourceTree = "<group>"; };
|
||||
1586600B24E58C3600345BD7 /* experiments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = experiments.cpp; sourceTree = "<group>"; };
|
||||
1586600C24E58C3600345BD7 /* experiments-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "experiments-inl.h"; sourceTree = "<group>"; };
|
||||
1586600D24E58C3600345BD7 /* experiments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = experiments.h; sourceTree = "<group>"; };
|
||||
1586600E24E58C3600345BD7 /* YGStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGStyle.cpp; sourceTree = "<group>"; };
|
||||
1586600F24E58C3600345BD7 /* YGNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGNode.cpp; sourceTree = "<group>"; };
|
||||
1586601024E58C3600345BD7 /* YGConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGConfig.cpp; sourceTree = "<group>"; };
|
||||
1586601124E58C3600345BD7 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utils.h; sourceTree = "<group>"; };
|
||||
1586601224E58C3600345BD7 /* BitUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitUtils.h; sourceTree = "<group>"; };
|
||||
1586601324E58C3600345BD7 /* CompactValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompactValue.h; sourceTree = "<group>"; };
|
||||
1586601424E58C3700345BD7 /* YGValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGValue.cpp; sourceTree = "<group>"; };
|
||||
1586601524E58C3700345BD7 /* YGLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGLayout.cpp; sourceTree = "<group>"; };
|
||||
1586601624E58C3700345BD7 /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
|
||||
1586601724E58C3700345BD7 /* YGNodePrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGNodePrint.cpp; sourceTree = "<group>"; };
|
||||
1586601924E58C3700345BD7 /* event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = event.h; sourceTree = "<group>"; };
|
||||
1586601A24E58C3700345BD7 /* event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = event.cpp; sourceTree = "<group>"; };
|
||||
1586601B24E58C3700345BD7 /* YGNodePrint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGNodePrint.h; sourceTree = "<group>"; };
|
||||
1586601C24E58C3700345BD7 /* Yoga.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Yoga.h; sourceTree = "<group>"; };
|
||||
1586601D24E58C3700345BD7 /* YGFloatOptional.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGFloatOptional.h; sourceTree = "<group>"; };
|
||||
1586601E24E58C3700345BD7 /* YGConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGConfig.h; sourceTree = "<group>"; };
|
||||
1586601F24E58C3700345BD7 /* YGMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGMacros.h; sourceTree = "<group>"; };
|
||||
1586602024E58C3700345BD7 /* YGEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGEnums.h; sourceTree = "<group>"; };
|
||||
1586602124E58C3700345BD7 /* log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = log.cpp; sourceTree = "<group>"; };
|
||||
1586602224E58C3700345BD7 /* YGStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGStyle.h; sourceTree = "<group>"; };
|
||||
1586602324E58C3700345BD7 /* Yoga.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Yoga.cpp; sourceTree = "<group>"; };
|
||||
1586602424E58C3700345BD7 /* Yoga-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Yoga-internal.h"; sourceTree = "<group>"; };
|
||||
1586602524E58C3700345BD7 /* YGValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGValue.h; sourceTree = "<group>"; };
|
||||
1586602624E58C3700345BD7 /* YGLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGLayout.h; sourceTree = "<group>"; };
|
||||
1586602724E58C3700345BD7 /* YGNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGNode.h; sourceTree = "<group>"; };
|
||||
1586602824E58C3700345BD7 /* YGEnums.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGEnums.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
153B525824E6AD6B008156D3 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
153B526E24E6AECF008156D3 /* libc++.tbd in Frameworks */,
|
||||
153B526B24E6ADFA008156D3 /* Yoga.framework in Frameworks */,
|
||||
153B526C24E6ADFA008156D3 /* YogaKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865F5124E5834E00345BD7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1586600824E58C0F00345BD7 /* Yoga.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865FFB24E58BD800345BD7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
153B525C24E6AD6B008156D3 /* YogaKitTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
153B526424E6AD8D008156D3 /* Info.plist */,
|
||||
153B526324E6AD8D008156D3 /* YogaKitTests.m */,
|
||||
154A6EF424E6B1260091264C /* dummy.swift */,
|
||||
);
|
||||
path = YogaKitTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
153D326C24E6545A00EDDBEA /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
153D326E24E6549A00EDDBEA /* Yoga-umbrella.h */,
|
||||
153D326D24E6549A00EDDBEA /* Yoga.modulemap */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865F4A24E5834E00345BD7 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15865F5624E5834E00345BD7 /* YogaKit */,
|
||||
15865FFF24E58BD800345BD7 /* Yoga */,
|
||||
153D326C24E6545A00EDDBEA /* Supporting Files */,
|
||||
153B525C24E6AD6B008156D3 /* YogaKitTests */,
|
||||
15865F5524E5834E00345BD7 /* Products */,
|
||||
15865FB824E584FF00345BD7 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865F5524E5834E00345BD7 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15865F5424E5834E00345BD7 /* YogaKit.framework */,
|
||||
15865FFE24E58BD800345BD7 /* Yoga.framework */,
|
||||
153B525B24E6AD6B008156D3 /* YogaKitTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865F5624E5834E00345BD7 /* YogaKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
153D327024E654EF00EDDBEA /* YGLayoutExtensions.swift */,
|
||||
15865F6024E583F000345BD7 /* UIView+Yoga.h */,
|
||||
15865F6324E583F000345BD7 /* UIView+Yoga.m */,
|
||||
15865F5F24E583F000345BD7 /* YGLayout.h */,
|
||||
15865F6224E583F000345BD7 /* YGLayout.m */,
|
||||
15865F6124E583F000345BD7 /* YGLayout+Private.h */,
|
||||
15865F6524E583F000345BD7 /* YogaKit.h */,
|
||||
);
|
||||
name = YogaKit;
|
||||
path = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865FB824E584FF00345BD7 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
153B526D24E6AECF008156D3 /* libc++.tbd */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865FFF24E58BD800345BD7 /* Yoga */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1586601224E58C3600345BD7 /* BitUtils.h */,
|
||||
1586601324E58C3600345BD7 /* CompactValue.h */,
|
||||
1586601824E58C3700345BD7 /* event */,
|
||||
1586600A24E58C3600345BD7 /* internal */,
|
||||
1586602124E58C3700345BD7 /* log.cpp */,
|
||||
1586601624E58C3700345BD7 /* log.h */,
|
||||
1586600924E58C3600345BD7 /* Utils.cpp */,
|
||||
1586601124E58C3600345BD7 /* Utils.h */,
|
||||
1586601024E58C3600345BD7 /* YGConfig.cpp */,
|
||||
1586601E24E58C3700345BD7 /* YGConfig.h */,
|
||||
1586602824E58C3700345BD7 /* YGEnums.cpp */,
|
||||
1586602024E58C3700345BD7 /* YGEnums.h */,
|
||||
1586601D24E58C3700345BD7 /* YGFloatOptional.h */,
|
||||
1586601524E58C3700345BD7 /* YGLayout.cpp */,
|
||||
1586602624E58C3700345BD7 /* YGLayout.h */,
|
||||
1586601F24E58C3700345BD7 /* YGMacros.h */,
|
||||
1586600F24E58C3600345BD7 /* YGNode.cpp */,
|
||||
1586602724E58C3700345BD7 /* YGNode.h */,
|
||||
1586601724E58C3700345BD7 /* YGNodePrint.cpp */,
|
||||
1586601B24E58C3700345BD7 /* YGNodePrint.h */,
|
||||
1586600E24E58C3600345BD7 /* YGStyle.cpp */,
|
||||
1586602224E58C3700345BD7 /* YGStyle.h */,
|
||||
1586601424E58C3700345BD7 /* YGValue.cpp */,
|
||||
1586602524E58C3700345BD7 /* YGValue.h */,
|
||||
1586602424E58C3700345BD7 /* Yoga-internal.h */,
|
||||
1586602324E58C3700345BD7 /* Yoga.cpp */,
|
||||
1586601C24E58C3700345BD7 /* Yoga.h */,
|
||||
);
|
||||
name = Yoga;
|
||||
path = ../yoga;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1586600A24E58C3600345BD7 /* internal */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1586600B24E58C3600345BD7 /* experiments.cpp */,
|
||||
1586600C24E58C3600345BD7 /* experiments-inl.h */,
|
||||
1586600D24E58C3600345BD7 /* experiments.h */,
|
||||
);
|
||||
path = internal;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1586601824E58C3700345BD7 /* event */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1586601924E58C3700345BD7 /* event.h */,
|
||||
1586601A24E58C3700345BD7 /* event.cpp */,
|
||||
);
|
||||
path = event;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
15865F4F24E5834E00345BD7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15865F6624E583F000345BD7 /* YGLayout.h in Headers */,
|
||||
15865F6724E583F000345BD7 /* UIView+Yoga.h in Headers */,
|
||||
15865F6C24E583F000345BD7 /* YogaKit.h in Headers */,
|
||||
15865F6824E583F000345BD7 /* YGLayout+Private.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865FF924E58BD800345BD7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1586603E24E58C3700345BD7 /* YGEnums.h in Headers */,
|
||||
1586603A24E58C3700345BD7 /* Yoga.h in Headers */,
|
||||
1586603D24E58C3700345BD7 /* YGMacros.h in Headers */,
|
||||
1586604324E58C3700345BD7 /* YGValue.h in Headers */,
|
||||
153D326F24E654A300EDDBEA /* Yoga-umbrella.h in Headers */,
|
||||
1586604524E58C3700345BD7 /* YGNode.h in Headers */,
|
||||
1586604024E58C3700345BD7 /* YGStyle.h in Headers */,
|
||||
1586603124E58C3700345BD7 /* BitUtils.h in Headers */,
|
||||
1586603024E58C3700345BD7 /* Utils.h in Headers */,
|
||||
1586602B24E58C3700345BD7 /* experiments-inl.h in Headers */,
|
||||
1586603724E58C3700345BD7 /* event.h in Headers */,
|
||||
1586603524E58C3700345BD7 /* log.h in Headers */,
|
||||
1586603224E58C3700345BD7 /* CompactValue.h in Headers */,
|
||||
1586603924E58C3700345BD7 /* YGNodePrint.h in Headers */,
|
||||
1586604224E58C3700345BD7 /* Yoga-internal.h in Headers */,
|
||||
1586603C24E58C3700345BD7 /* YGConfig.h in Headers */,
|
||||
1586604424E58C3700345BD7 /* YGLayout.h in Headers */,
|
||||
1586602C24E58C3700345BD7 /* experiments.h in Headers */,
|
||||
1586603B24E58C3700345BD7 /* YGFloatOptional.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
153B525A24E6AD6B008156D3 /* YogaKitTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 153B526024E6AD6B008156D3 /* Build configuration list for PBXNativeTarget "YogaKitTests" */;
|
||||
buildPhases = (
|
||||
153B525724E6AD6B008156D3 /* Sources */,
|
||||
153B525824E6AD6B008156D3 /* Frameworks */,
|
||||
153B525924E6AD6B008156D3 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
153B526824E6ADF4008156D3 /* PBXTargetDependency */,
|
||||
153B526A24E6ADF4008156D3 /* PBXTargetDependency */,
|
||||
);
|
||||
name = YogaKitTests;
|
||||
productName = YogaKitTests;
|
||||
productReference = 153B525B24E6AD6B008156D3 /* YogaKitTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
15865F5324E5834E00345BD7 /* YogaKit */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 15865F5C24E5834E00345BD7 /* Build configuration list for PBXNativeTarget "YogaKit" */;
|
||||
buildPhases = (
|
||||
15865F4F24E5834E00345BD7 /* Headers */,
|
||||
15865F5024E5834E00345BD7 /* Sources */,
|
||||
15865F5124E5834E00345BD7 /* Frameworks */,
|
||||
15865F5224E5834E00345BD7 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1586600724E58C0900345BD7 /* PBXTargetDependency */,
|
||||
);
|
||||
name = YogaKit;
|
||||
productName = YogaKit;
|
||||
productReference = 15865F5424E5834E00345BD7 /* YogaKit.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
15865FFD24E58BD800345BD7 /* Yoga */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1586600324E58BD800345BD7 /* Build configuration list for PBXNativeTarget "Yoga" */;
|
||||
buildPhases = (
|
||||
15865FF924E58BD800345BD7 /* Headers */,
|
||||
15865FFA24E58BD800345BD7 /* Sources */,
|
||||
15865FFB24E58BD800345BD7 /* Frameworks */,
|
||||
15865FFC24E58BD800345BD7 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Yoga;
|
||||
productName = Yoga;
|
||||
productReference = 15865FFE24E58BD800345BD7 /* Yoga.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
15865F4B24E5834E00345BD7 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1160;
|
||||
ORGANIZATIONNAME = facebook;
|
||||
TargetAttributes = {
|
||||
153B525A24E6AD6B008156D3 = {
|
||||
CreatedOnToolsVersion = 11.6;
|
||||
LastSwiftMigration = 1160;
|
||||
};
|
||||
15865F5324E5834E00345BD7 = {
|
||||
CreatedOnToolsVersion = 11.6;
|
||||
LastSwiftMigration = 1160;
|
||||
};
|
||||
15865FFD24E58BD800345BD7 = {
|
||||
CreatedOnToolsVersion = 11.6;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 15865F4E24E5834E00345BD7 /* Build configuration list for PBXProject "YogaKit" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 15865F4A24E5834E00345BD7;
|
||||
productRefGroup = 15865F5524E5834E00345BD7 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
15865F5324E5834E00345BD7 /* YogaKit */,
|
||||
15865FFD24E58BD800345BD7 /* Yoga */,
|
||||
153B525A24E6AD6B008156D3 /* YogaKitTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
153B525924E6AD6B008156D3 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865F5224E5834E00345BD7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865FFC24E58BD800345BD7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
153B525724E6AD6B008156D3 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
154A6EF524E6B1260091264C /* dummy.swift in Sources */,
|
||||
153B526524E6AD8D008156D3 /* YogaKitTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865F5024E5834E00345BD7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
153D327124E654EF00EDDBEA /* YGLayoutExtensions.swift in Sources */,
|
||||
15865F6A24E583F000345BD7 /* UIView+Yoga.m in Sources */,
|
||||
15865F6924E583F000345BD7 /* YGLayout.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15865FFA24E58BD800345BD7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1586602A24E58C3700345BD7 /* experiments.cpp in Sources */,
|
||||
1586602F24E58C3700345BD7 /* YGConfig.cpp in Sources */,
|
||||
1586602E24E58C3700345BD7 /* YGNode.cpp in Sources */,
|
||||
1586603624E58C3700345BD7 /* YGNodePrint.cpp in Sources */,
|
||||
1586604624E58C3700345BD7 /* YGEnums.cpp in Sources */,
|
||||
1586602D24E58C3700345BD7 /* YGStyle.cpp in Sources */,
|
||||
1586604124E58C3700345BD7 /* Yoga.cpp in Sources */,
|
||||
1586602924E58C3700345BD7 /* Utils.cpp in Sources */,
|
||||
1586603424E58C3700345BD7 /* YGLayout.cpp in Sources */,
|
||||
1586603824E58C3700345BD7 /* event.cpp in Sources */,
|
||||
1586603F24E58C3700345BD7 /* log.cpp in Sources */,
|
||||
1586603324E58C3700345BD7 /* YGValue.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
153B526824E6ADF4008156D3 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
platformFilter = ios;
|
||||
target = 15865FFD24E58BD800345BD7 /* Yoga */;
|
||||
targetProxy = 153B526724E6ADF4008156D3 /* PBXContainerItemProxy */;
|
||||
};
|
||||
153B526A24E6ADF4008156D3 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
platformFilter = ios;
|
||||
target = 15865F5324E5834E00345BD7 /* YogaKit */;
|
||||
targetProxy = 153B526924E6ADF4008156D3 /* PBXContainerItemProxy */;
|
||||
};
|
||||
1586600724E58C0900345BD7 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 15865FFD24E58BD800345BD7 /* Yoga */;
|
||||
targetProxy = 1586600624E58C0900345BD7 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
153B526124E6AD6B008156D3 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = "${SRCROOT}/Tests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
153B526224E6AD6B008156D3 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = "${SRCROOT}/Tests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
15865F5A24E5834E00345BD7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"ARCHS[sdk=appletvos*]" = arm64;
|
||||
"ARCHS[sdk=appletvsimulator*]" = x86_64;
|
||||
"ARCHS[sdk=iphoneos*]" = (
|
||||
arm64,
|
||||
armv7,
|
||||
);
|
||||
"ARCHS[sdk=iphonesimulator*]" = (
|
||||
i386,
|
||||
x86_64,
|
||||
);
|
||||
"ARCHS[sdk=macosx*]" = x86_64;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,6";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VALID_ARCHS = "i386 x86_64 arm64 armv7 arm64e armv7s";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
15865F5B24E5834E00345BD7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"ARCHS[sdk=appletvos*]" = arm64;
|
||||
"ARCHS[sdk=iphoneos*]" = (
|
||||
arm64,
|
||||
armv7,
|
||||
);
|
||||
"ARCHS[sdk=macosx*]" = x86_64;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,6";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VALID_ARCHS = "i386 x86_64 arm64 armv7 arm64e armv7s";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
15865F5D24E5834E00345BD7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
15865F5E24E5834E00345BD7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1586600424E58BD800345BD7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_INPUT_FILETYPE = sourcecode.cpp.cpp;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
MODULEMAP_FILE = "${SRCROOT}/Yoga.modulemap";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Yoga;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1586600524E58BD800345BD7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_INPUT_FILETYPE = sourcecode.cpp.cpp;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
MODULEMAP_FILE = "${SRCROOT}/Yoga.modulemap";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Yoga;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
153B526024E6AD6B008156D3 /* Build configuration list for PBXNativeTarget "YogaKitTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
153B526124E6AD6B008156D3 /* Debug */,
|
||||
153B526224E6AD6B008156D3 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
15865F4E24E5834E00345BD7 /* Build configuration list for PBXProject "YogaKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
15865F5A24E5834E00345BD7 /* Debug */,
|
||||
15865F5B24E5834E00345BD7 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
15865F5C24E5834E00345BD7 /* Build configuration list for PBXNativeTarget "YogaKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
15865F5D24E5834E00345BD7 /* Debug */,
|
||||
15865F5E24E5834E00345BD7 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1586600324E58BD800345BD7 /* Build configuration list for PBXNativeTarget "Yoga" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1586600424E58BD800345BD7 /* Debug */,
|
||||
1586600524E58BD800345BD7 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 15865F4B24E5834E00345BD7 /* Project object */;
|
||||
}
|
7
YogaKit/YogaKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
YogaKit/YogaKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:YogaKit.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1160"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "15865FFD24E58BD800345BD7"
|
||||
BuildableName = "Yoga.framework"
|
||||
BlueprintName = "Yoga"
|
||||
ReferencedContainer = "container:YogaKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "15865FFD24E58BD800345BD7"
|
||||
BuildableName = "Yoga.framework"
|
||||
BlueprintName = "Yoga"
|
||||
ReferencedContainer = "container:YogaKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1160"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "15865F5324E5834E00345BD7"
|
||||
BuildableName = "YogaKit.framework"
|
||||
BlueprintName = "YogaKit"
|
||||
ReferencedContainer = "container:YogaKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "15865F5324E5834E00345BD7"
|
||||
BuildableName = "YogaKit.framework"
|
||||
BlueprintName = "YogaKit"
|
||||
ReferencedContainer = "container:YogaKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@@ -1,6 +1,21 @@
|
||||
|
||||
use_frameworks!
|
||||
|
||||
target 'YogaKitSample' do
|
||||
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
||||
pod 'IGListKit', '~> 2.1.0'
|
||||
platform :ios, '9.0'
|
||||
pod 'Yoga', :path => '../../Yoga.podspec'
|
||||
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
||||
pod 'IGListKit', '~> 4.0.0'
|
||||
end
|
||||
|
||||
target 'YogaKitTVSample' do
|
||||
platform :tvos, '9.0'
|
||||
pod 'Yoga', :path => '../../Yoga.podspec'
|
||||
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
||||
end
|
||||
|
||||
target 'YogaKitOSXSample' do
|
||||
platform :osx, '10.10'
|
||||
pod 'Yoga', :path => '../../Yoga.podspec'
|
||||
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
||||
end
|
||||
|
@@ -1,26 +1,33 @@
|
||||
PODS:
|
||||
- IGListKit (2.1.0):
|
||||
- IGListKit/Default (= 2.1.0)
|
||||
- IGListKit/Default (2.1.0):
|
||||
- IGListKit/Diffing
|
||||
- IGListKit/Diffing (2.1.0)
|
||||
- Yoga (1.7.0)
|
||||
- YogaKit (1.7.0):
|
||||
- Yoga (~> 1.7)
|
||||
- IGListDiffKit (4.0.0)
|
||||
- IGListKit (4.0.0):
|
||||
- IGListDiffKit (= 4.0.0)
|
||||
- Yoga (1.14.1)
|
||||
- YogaKit (1.18.2):
|
||||
- Yoga (~> 1.14.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- IGListKit (~> 2.1.0)
|
||||
- IGListKit (~> 4.0.0)
|
||||
- Yoga (from `../../Yoga.podspec`)
|
||||
- YogaKit (from `../../YogaKit.podspec`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- IGListDiffKit
|
||||
- IGListKit
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Yoga:
|
||||
:path: "../../Yoga.podspec"
|
||||
YogaKit:
|
||||
:path: ../../YogaKit.podspec
|
||||
:path: "../../YogaKit.podspec"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e
|
||||
Yoga: 2ed1d7accfef3610a67f58c0cf101a0662137f2c
|
||||
YogaKit: 31576530e8fcae3175469719ec3212397403330b
|
||||
IGListDiffKit: 665d6cf43ce726e676013db9c7d6c4294259b6b2
|
||||
IGListKit: fd5a5d21935298f5849fa49d426843cff97b77c7
|
||||
Yoga: 21a6025b8ce1624d5bf5202b1af67cd43da8edfc
|
||||
YogaKit: c404496039efd6abb76408c15804180a247908f5
|
||||
|
||||
PODFILE CHECKSUM: 216f8e7127767709e0e43f3711208d238fa5c404
|
||||
PODFILE CHECKSUM: e8d71f0fe05bb5e3cfd81b54d07bd1a904e18968
|
||||
|
||||
COCOAPODS: 1.1.1
|
||||
COCOAPODS: 1.9.3
|
||||
|
15
YogaKit/YogaKitSample/YogaKitOSXSample/AppDelegate.h
Normal file
15
YogaKit/YogaKitSample/YogaKitOSXSample/AppDelegate.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// YogaKitOSXSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
|
||||
@end
|
||||
|
27
YogaKit/YogaKitSample/YogaKitOSXSample/AppDelegate.m
Normal file
27
YogaKit/YogaKitSample/YogaKitOSXSample/AppDelegate.m
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// YogaKitOSXSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,717 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
<scene sceneID="JPo-4y-FX3">
|
||||
<objects>
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="YogaKitOSXSample" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="YogaKitOSXSample" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About YogaKitOSXSample" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide YogaKitOSXSample" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit YogaKitOSXSample" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="YogaKitOSXSample Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
||||
</connections>
|
||||
</application>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider=""/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="0.0"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="250"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<view key="view" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="655"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
36
YogaKit/YogaKitSample/YogaKitOSXSample/Info.plist
Normal file
36
YogaKit/YogaKitSample/YogaKitOSXSample/Info.plist
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2020 facebook. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticTermination</key>
|
||||
<true/>
|
||||
<key>NSSupportsSuddenTermination</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
15
YogaKit/YogaKitSample/YogaKitOSXSample/ViewController.h
Normal file
15
YogaKit/YogaKitSample/YogaKitOSXSample/ViewController.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// ViewController.h
|
||||
// YogaKitOSXSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ViewController : NSViewController
|
||||
|
||||
|
||||
@end
|
||||
|
68
YogaKit/YogaKitSample/YogaKitOSXSample/ViewController.m
Normal file
68
YogaKit/YogaKitSample/YogaKitOSXSample/ViewController.m
Normal file
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ViewController.m
|
||||
// YogaKitOSXSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
@import YogaKit;
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
NSView *root = self.view;
|
||||
root.wantsLayer = YES;
|
||||
root.layer.backgroundColor = NSColor.whiteColor.CGColor;
|
||||
[root configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignItems = YGAlignCenter;
|
||||
layout.justifyContent = YGJustifyCenter;
|
||||
}];
|
||||
|
||||
NSView *child1 = [[NSView alloc] init];
|
||||
child1.wantsLayer = YES;
|
||||
child1.layer.backgroundColor = NSColor.blueColor.CGColor;
|
||||
[child1 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.width = YGPointValue(100);
|
||||
layout.height = YGPointValue(10);
|
||||
layout.marginBottom = YGPointValue(25);
|
||||
}];
|
||||
[root addSubview:child1];
|
||||
|
||||
NSView *child2 = [[NSView alloc] init];
|
||||
child2.wantsLayer = YES;
|
||||
child2.layer.backgroundColor = NSColor.greenColor.CGColor;
|
||||
[child2 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignSelf = YGAlignFlexEnd;
|
||||
layout.width = YGPointValue(200);
|
||||
layout.height = YGPointValue(200);
|
||||
}];
|
||||
[root addSubview:child2];
|
||||
|
||||
NSView *child3 = [[NSView alloc] init];
|
||||
child3.wantsLayer = YES;
|
||||
child3.layer.backgroundColor = NSColor.yellowColor.CGColor;
|
||||
[child3 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignSelf = YGAlignFlexStart;
|
||||
layout.width = YGPointValue(100);
|
||||
layout.height = YGPointValue(100);
|
||||
}];
|
||||
[root addSubview:child3];
|
||||
}
|
||||
|
||||
|
||||
- (void)setRepresentedObject:(id)representedObject {
|
||||
[super setRepresentedObject:representedObject];
|
||||
|
||||
// Update the view, if already loaded.
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
1
YogaKit/YogaKitSample/YogaKitOSXSample/dummy.swift
Normal file
1
YogaKit/YogaKitSample/YogaKitOSXSample/dummy.swift
Normal file
@@ -0,0 +1 @@
|
||||
|
16
YogaKit/YogaKitSample/YogaKitOSXSample/main.m
Normal file
16
YogaKit/YogaKitSample/YogaKitOSXSample/main.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// main.m
|
||||
// YogaKitOSXSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
@autoreleasepool {
|
||||
// Setup code that might create autoreleased objects goes here.
|
||||
}
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
@@ -1,10 +1,3 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
@@ -17,24 +10,32 @@
|
||||
13687D531DF8748400E7C260 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13687D521DF8748400E7C260 /* Assets.xcassets */; };
|
||||
13687D851DF87D1E00E7C260 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D841DF87D1E00E7C260 /* UIKit.framework */; };
|
||||
13687D871DF87D2400E7C260 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D861DF87D2400E7C260 /* Foundation.framework */; };
|
||||
15865F3524E56F7800345BD7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 15865F3424E56F7800345BD7 /* AppDelegate.m */; };
|
||||
15865F3824E56F7800345BD7 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 15865F3724E56F7800345BD7 /* ViewController.m */; };
|
||||
15865F3A24E56F7800345BD7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 15865F3924E56F7800345BD7 /* Assets.xcassets */; };
|
||||
15865F3D24E56F7800345BD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15865F3B24E56F7800345BD7 /* Main.storyboard */; };
|
||||
15865F4024E56F7800345BD7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15865F3F24E56F7800345BD7 /* main.m */; };
|
||||
15865F4624E5747800345BD7 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15865F4524E5747800345BD7 /* libc++.tbd */; };
|
||||
15865F4824E5748900345BD7 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15865F4724E5748900345BD7 /* dummy.swift */; };
|
||||
1593D6D3BEDCC3E520D136F4 /* Pods_YogaKitOSXSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C318BAE128876A3592EA4EE7 /* Pods_YogaKitOSXSample.framework */; };
|
||||
15A7CB5995C9DAB1C8803834 /* Pods_YogaKitSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */; };
|
||||
15E1C33C24E568410086A4E6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C33B24E568410086A4E6 /* AppDelegate.m */; };
|
||||
15E1C33F24E568410086A4E6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C33E24E568410086A4E6 /* ViewController.m */; };
|
||||
15E1C34224E568410086A4E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34024E568410086A4E6 /* Main.storyboard */; };
|
||||
15E1C34424E568420086A4E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34324E568420086A4E6 /* Assets.xcassets */; };
|
||||
15E1C34724E568420086A4E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */; };
|
||||
15E1C34A24E568420086A4E6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C34924E568420086A4E6 /* main.m */; };
|
||||
15E1C34F24E56A8A0086A4E6 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C34E24E56A8A0086A4E6 /* dummy.swift */; };
|
||||
15E1C35124E56AB60086A4E6 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E1C35024E56AB60086A4E6 /* libc++.tbd */; };
|
||||
15F7301F24E7C097000108AD /* AutoLayoutMixedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15F7301E24E7C097000108AD /* AutoLayoutMixedViewController.swift */; };
|
||||
40BD9F461E477A09002790A9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F451E477A09002790A9 /* AppDelegate.swift */; };
|
||||
40BD9F4B1E47850C002790A9 /* BasicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */; };
|
||||
40BD9F501E479079002790A9 /* SingleLabelCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */; };
|
||||
40BD9F521E479173002790A9 /* LayoutInclusionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */; };
|
||||
638A94481E1F06D100A726AD /* ExamplesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 638A94471E1F06D100A726AD /* ExamplesViewController.swift */; };
|
||||
FF76EAD6A7089159C35EED45 /* Pods_YogaKitTVSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
638A94541E215CC800A726AD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 13687D3B1DF8748300E7C260 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 13687D421DF8748300E7C260;
|
||||
remoteInfo = YogaKitSample;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
13687D771DF878A000E7C260 /* yoga */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
@@ -59,20 +60,54 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
130B3C3D7B95A7F1337972B2 /* Pods-YogaKitOSXSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitOSXSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitOSXSample/Pods-YogaKitOSXSample.release.xcconfig"; sourceTree = "<group>"; };
|
||||
13687D431DF8748400E7C260 /* YogaKitSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13687D521DF8748400E7C260 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
13687D571DF8748400E7C260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
13687D841DF87D1E00E7C260 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
13687D861DF87D2400E7C260 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
15865F3124E56F7800345BD7 /* YogaKitOSXSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitOSXSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
15865F3324E56F7800345BD7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
15865F3424E56F7800345BD7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
15865F3624E56F7800345BD7 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
15865F3724E56F7800345BD7 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
15865F3924E56F7800345BD7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
15865F3C24E56F7800345BD7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
15865F3E24E56F7800345BD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
15865F3F24E56F7800345BD7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
15865F4124E56F7800345BD7 /* YogaKitOSXSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = YogaKitOSXSample.entitlements; sourceTree = "<group>"; };
|
||||
15865F4524E5747800345BD7 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
|
||||
15865F4724E5748900345BD7 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = "<group>"; };
|
||||
15865F4924E577BE00345BD7 /* YogaKitSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = YogaKitSample.entitlements; sourceTree = "<group>"; };
|
||||
15E1C33824E568410086A4E6 /* YogaKitTVSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitTVSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
15E1C33A24E568410086A4E6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
15E1C33B24E568410086A4E6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
15E1C33D24E568410086A4E6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
15E1C33E24E568410086A4E6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
15E1C34124E568410086A4E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
15E1C34324E568420086A4E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
15E1C34624E568420086A4E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
15E1C34824E568420086A4E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
15E1C34924E568420086A4E6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
15E1C34E24E56A8A0086A4E6 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = "<group>"; };
|
||||
15E1C35024E56AB60086A4E6 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
|
||||
15F7301E24E7C097000108AD /* AutoLayoutMixedViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoLayoutMixedViewController.swift; sourceTree = "<group>"; };
|
||||
1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
40BD9F451E477A09002790A9 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
40BD9F4A1E47850C002790A9 /* BasicViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BasicViewController.swift; path = ViewControllers/BasicViewController.swift; sourceTree = "<group>"; };
|
||||
40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SingleLabelCollectionCell.swift; path = Views/SingleLabelCollectionCell.swift; sourceTree = "<group>"; };
|
||||
40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LayoutInclusionViewController.swift; path = ViewControllers/LayoutInclusionViewController.swift; sourceTree = "<group>"; };
|
||||
4BB0C63590A97352D30E310E /* Pods_YogaKitSampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitSampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitTVSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitTVSample/Pods-YogaKitTVSample.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitTVSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitTVSample/Pods-YogaKitTVSample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
638A94471E1F06D100A726AD /* ExamplesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesViewController.swift; sourceTree = "<group>"; };
|
||||
638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YogaKitSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6D7F92331FB484D6ED42C5E9 /* Pods-YogaKitOSXSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitOSXSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitOSXSample/Pods-YogaKitOSXSample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.release.xcconfig"; sourceTree = "<group>"; };
|
||||
8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitTVSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A26128CF4F9CAE93983FF74F /* Pods-YogaKitSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
C318BAE128876A3592EA4EE7 /* Pods_YogaKitOSXSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitOSXSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FF607399A6E2DE06593D1FA8 /* Pods-YogaKitSampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -86,10 +121,21 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
638A944C1E215CC800A726AD /* Frameworks */ = {
|
||||
15865F2E24E56F7800345BD7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15865F4624E5747800345BD7 /* libc++.tbd in Frameworks */,
|
||||
1593D6D3BEDCC3E520D136F4 /* Pods_YogaKitOSXSample.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15E1C33524E568410086A4E6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15E1C35124E56AB60086A4E6 /* libc++.tbd in Frameworks */,
|
||||
FF76EAD6A7089159C35EED45 /* Pods_YogaKitTVSample.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -100,6 +146,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13687D451DF8748400E7C260 /* YogaKitSample */,
|
||||
15E1C33924E568410086A4E6 /* YogaKitTVSample */,
|
||||
15865F3224E56F7800345BD7 /* YogaKitOSXSample */,
|
||||
13687D441DF8748400E7C260 /* Products */,
|
||||
13687D831DF87D1E00E7C260 /* Frameworks */,
|
||||
E1C759E3C8E84821213ECE8D /* Pods */,
|
||||
@@ -110,7 +158,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13687D431DF8748400E7C260 /* YogaKitSample.app */,
|
||||
638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */,
|
||||
15E1C33824E568410086A4E6 /* YogaKitTVSample.app */,
|
||||
15865F3124E56F7800345BD7 /* YogaKitOSXSample.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -118,6 +167,7 @@
|
||||
13687D451DF8748400E7C260 /* YogaKitSample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15865F4924E577BE00345BD7 /* YogaKitSample.entitlements */,
|
||||
40BD9F4E1E47902F002790A9 /* Views */,
|
||||
40BD9F481E4784B3002790A9 /* ViewControllers */,
|
||||
638A94471E1F06D100A726AD /* ExamplesViewController.swift */,
|
||||
@@ -131,18 +181,58 @@
|
||||
13687D831DF87D1E00E7C260 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15E1C35024E56AB60086A4E6 /* libc++.tbd */,
|
||||
15865F4524E5747800345BD7 /* libc++.tbd */,
|
||||
13687D861DF87D2400E7C260 /* Foundation.framework */,
|
||||
13687D841DF87D1E00E7C260 /* UIKit.framework */,
|
||||
C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */,
|
||||
4BB0C63590A97352D30E310E /* Pods_YogaKitSampleTests.framework */,
|
||||
8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */,
|
||||
C318BAE128876A3592EA4EE7 /* Pods_YogaKitOSXSample.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15865F3224E56F7800345BD7 /* YogaKitOSXSample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15865F3324E56F7800345BD7 /* AppDelegate.h */,
|
||||
15865F3424E56F7800345BD7 /* AppDelegate.m */,
|
||||
15865F3624E56F7800345BD7 /* ViewController.h */,
|
||||
15865F3724E56F7800345BD7 /* ViewController.m */,
|
||||
15865F3924E56F7800345BD7 /* Assets.xcassets */,
|
||||
15865F3B24E56F7800345BD7 /* Main.storyboard */,
|
||||
15865F3E24E56F7800345BD7 /* Info.plist */,
|
||||
15865F3F24E56F7800345BD7 /* main.m */,
|
||||
15865F4724E5748900345BD7 /* dummy.swift */,
|
||||
15865F4124E56F7800345BD7 /* YogaKitOSXSample.entitlements */,
|
||||
);
|
||||
path = YogaKitOSXSample;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15E1C33924E568410086A4E6 /* YogaKitTVSample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15E1C33A24E568410086A4E6 /* AppDelegate.h */,
|
||||
15E1C33B24E568410086A4E6 /* AppDelegate.m */,
|
||||
15E1C33D24E568410086A4E6 /* ViewController.h */,
|
||||
15E1C33E24E568410086A4E6 /* ViewController.m */,
|
||||
15E1C34024E568410086A4E6 /* Main.storyboard */,
|
||||
15E1C34324E568420086A4E6 /* Assets.xcassets */,
|
||||
15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */,
|
||||
15E1C34824E568420086A4E6 /* Info.plist */,
|
||||
15E1C34924E568420086A4E6 /* main.m */,
|
||||
15E1C34E24E56A8A0086A4E6 /* dummy.swift */,
|
||||
);
|
||||
path = YogaKitTVSample;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
40BD9F481E4784B3002790A9 /* ViewControllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
40BD9F4A1E47850C002790A9 /* BasicViewController.swift */,
|
||||
40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */,
|
||||
15F7301E24E7C097000108AD /* AutoLayoutMixedViewController.swift */,
|
||||
);
|
||||
name = ViewControllers;
|
||||
sourceTree = "<group>";
|
||||
@@ -160,6 +250,12 @@
|
||||
children = (
|
||||
1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */,
|
||||
82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */,
|
||||
A26128CF4F9CAE93983FF74F /* Pods-YogaKitSampleTests.debug.xcconfig */,
|
||||
FF607399A6E2DE06593D1FA8 /* Pods-YogaKitSampleTests.release.xcconfig */,
|
||||
5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */,
|
||||
51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */,
|
||||
6D7F92331FB484D6ED42C5E9 /* Pods-YogaKitOSXSample.debug.xcconfig */,
|
||||
130B3C3D7B95A7F1337972B2 /* Pods-YogaKitOSXSample.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -178,7 +274,6 @@
|
||||
13687D401DF8748300E7C260 /* Frameworks */,
|
||||
13687D411DF8748300E7C260 /* Resources */,
|
||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */,
|
||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -189,23 +284,41 @@
|
||||
productReference = 13687D431DF8748400E7C260 /* YogaKitSample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
638A944E1E215CC800A726AD /* YogaKitSampleTests */ = {
|
||||
15865F3024E56F7800345BD7 /* YogaKitOSXSample */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 638A94561E215CC800A726AD /* Build configuration list for PBXNativeTarget "YogaKitSampleTests" */;
|
||||
buildConfigurationList = 15865F4424E56F7800345BD7 /* Build configuration list for PBXNativeTarget "YogaKitOSXSample" */;
|
||||
buildPhases = (
|
||||
638A944B1E215CC800A726AD /* Sources */,
|
||||
638A944C1E215CC800A726AD /* Frameworks */,
|
||||
638A944D1E215CC800A726AD /* Resources */,
|
||||
48411F57309F483CDA923BEA /* [CP] Check Pods Manifest.lock */,
|
||||
15865F2D24E56F7800345BD7 /* Sources */,
|
||||
15865F2E24E56F7800345BD7 /* Frameworks */,
|
||||
15865F2F24E56F7800345BD7 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
638A94551E215CC800A726AD /* PBXTargetDependency */,
|
||||
);
|
||||
name = YogaKitSampleTests;
|
||||
productName = YogaKitSampleTests;
|
||||
productReference = 638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
name = YogaKitOSXSample;
|
||||
productName = YogaKitOSXSample;
|
||||
productReference = 15865F3124E56F7800345BD7 /* YogaKitOSXSample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
15E1C33724E568410086A4E6 /* YogaKitTVSample */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 15E1C34D24E568420086A4E6 /* Build configuration list for PBXNativeTarget "YogaKitTVSample" */;
|
||||
buildPhases = (
|
||||
EEAEE027484A739D2AFF1F33 /* [CP] Check Pods Manifest.lock */,
|
||||
15E1C33424E568410086A4E6 /* Sources */,
|
||||
15E1C33524E568410086A4E6 /* Frameworks */,
|
||||
15E1C33624E568410086A4E6 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = YogaKitTVSample;
|
||||
productName = YogaKitTVSample;
|
||||
productReference = 15E1C33824E568410086A4E6 /* YogaKitTVSample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
@@ -221,10 +334,15 @@
|
||||
LastSwiftMigration = 0820;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
638A944E1E215CC800A726AD = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
15865F3024E56F7800345BD7 = {
|
||||
CreatedOnToolsVersion = 11.6;
|
||||
LastSwiftMigration = 1160;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
15E1C33724E568410086A4E6 = {
|
||||
CreatedOnToolsVersion = 11.6;
|
||||
LastSwiftMigration = 1160;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 13687D421DF8748300E7C260;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -233,6 +351,7 @@
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
@@ -242,7 +361,8 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
13687D421DF8748300E7C260 /* YogaKitSample */,
|
||||
638A944E1E215CC800A726AD /* YogaKitSampleTests */,
|
||||
15E1C33724E568410086A4E6 /* YogaKitTVSample */,
|
||||
15865F3024E56F7800345BD7 /* YogaKitOSXSample */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -256,44 +376,88 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
638A944D1E215CC800A726AD /* Resources */ = {
|
||||
15865F2F24E56F7800345BD7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15865F3A24E56F7800345BD7 /* Assets.xcassets in Resources */,
|
||||
15865F3D24E56F7800345BD7 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15E1C33624E568410086A4E6 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15E1C34724E568420086A4E6 /* LaunchScreen.storyboard in Resources */,
|
||||
15E1C34424E568420086A4E6 /* Assets.xcassets in Resources */,
|
||||
15E1C34224E568410086A4E6 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
48411F57309F483CDA923BEA /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-YogaKitOSXSample-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
513B543F92B2E4F4D1EE1CE7 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-YogaKitSample-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */ = {
|
||||
EEAEE027484A739D2AFF1F33 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-YogaKitTVSample-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-resources.sh\"\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = {
|
||||
@@ -302,13 +466,18 @@
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/IGListDiffKit/IGListDiffKit.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/IGListKit/IGListKit.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListDiffKit.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListKit.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
@@ -323,25 +492,60 @@
|
||||
638A94481E1F06D100A726AD /* ExamplesViewController.swift in Sources */,
|
||||
40BD9F4B1E47850C002790A9 /* BasicViewController.swift in Sources */,
|
||||
40BD9F461E477A09002790A9 /* AppDelegate.swift in Sources */,
|
||||
15F7301F24E7C097000108AD /* AutoLayoutMixedViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
638A944B1E215CC800A726AD /* Sources */ = {
|
||||
15865F2D24E56F7800345BD7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15865F3824E56F7800345BD7 /* ViewController.m in Sources */,
|
||||
15865F4024E56F7800345BD7 /* main.m in Sources */,
|
||||
15865F4824E5748900345BD7 /* dummy.swift in Sources */,
|
||||
15865F3524E56F7800345BD7 /* AppDelegate.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
15E1C33424E568410086A4E6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15E1C33F24E568410086A4E6 /* ViewController.m in Sources */,
|
||||
15E1C34A24E568420086A4E6 /* main.m in Sources */,
|
||||
15E1C34F24E56A8A0086A4E6 /* dummy.swift in Sources */,
|
||||
15E1C33C24E568410086A4E6 /* AppDelegate.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
638A94551E215CC800A726AD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 13687D421DF8748300E7C260 /* YogaKitSample */;
|
||||
targetProxy = 638A94541E215CC800A726AD /* PBXContainerItemProxy */;
|
||||
/* Begin PBXVariantGroup section */
|
||||
15865F3B24E56F7800345BD7 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
15865F3C24E56F7800345BD7 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
15E1C34024E568410086A4E6 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
15E1C34124E568410086A4E6 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
15E1C34624E568420086A4E6 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
13687D581DF8748400E7C260 /* Debug */ = {
|
||||
@@ -440,13 +644,18 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = YogaKitSample/YogaKitSample.entitlements;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = YogaKitSample/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -456,40 +665,151 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = YogaKitSample/YogaKitSample.entitlements;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = YogaKitSample/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
638A94571E215CC800A726AD /* Debug */ = {
|
||||
15865F4224E56F7800345BD7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 6D7F92331FB484D6ED42C5E9 /* Pods-YogaKitOSXSample.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = YogaKitOSXSample/YogaKitOSXSample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = YogaKitOSXSample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitOSXSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YogaKitSample.app/YogaKitSample";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
638A94581E215CC800A726AD /* Release */ = {
|
||||
15865F4324E56F7800345BD7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 130B3C3D7B95A7F1337972B2 /* Pods-YogaKitOSXSample.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = YogaKitOSXSample/YogaKitOSXSample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = YogaKitOSXSample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitOSXSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YogaKitSample.app/YogaKitSample";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
15E1C34B24E568420086A4E6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = YogaKitTVSample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTVSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
15E1C34C24E568420086A4E6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = YogaKitTVSample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTVSample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -514,11 +834,20 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
638A94561E215CC800A726AD /* Build configuration list for PBXNativeTarget "YogaKitSampleTests" */ = {
|
||||
15865F4424E56F7800345BD7 /* Build configuration list for PBXNativeTarget "YogaKitOSXSample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
638A94571E215CC800A726AD /* Debug */,
|
||||
638A94581E215CC800A726AD /* Release */,
|
||||
15865F4224E56F7800345BD7 /* Debug */,
|
||||
15865F4324E56F7800345BD7 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
15E1C34D24E568420086A4E6 /* Build configuration list for PBXNativeTarget "YogaKitTVSample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
15E1C34B24E568420086A4E6 /* Debug */,
|
||||
15E1C34C24E568420086A4E6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// AutoLayoutMixedViewController.swift
|
||||
// YogaKitSample
|
||||
//
|
||||
// Created by lvv on 2020/8/15.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import YogaKit
|
||||
|
||||
class AutoLayoutMixedViewController : UIViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
view.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.alignItems = .center
|
||||
layout.justifyContent = .center
|
||||
}
|
||||
|
||||
let container = UIView()
|
||||
container.backgroundColor = .orange
|
||||
container.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
|
||||
layout.paddingTop = 20
|
||||
layout.paddingLeft = 20
|
||||
layout.paddingBottom = 20
|
||||
layout.paddingRight = 70
|
||||
|
||||
layout.width = 100%
|
||||
}
|
||||
view.addSubview(container)
|
||||
|
||||
let subView1 = UIView()
|
||||
subView1.backgroundColor = .red
|
||||
subView1.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.height = 30;
|
||||
}
|
||||
container.addSubview(subView1)
|
||||
|
||||
let subView2 = UIView()
|
||||
subView2.backgroundColor = .yellow
|
||||
subView2.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.marginTop = 25
|
||||
layout.height = 10;
|
||||
}
|
||||
container.addSubview(subView2)
|
||||
|
||||
let subView3 = UIView()
|
||||
subView3.backgroundColor = .blue
|
||||
subView3.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.marginTop = 25
|
||||
layout.height = 20;
|
||||
}
|
||||
container.addSubview(subView3)
|
||||
|
||||
let subView4 = UIView()
|
||||
subView4.backgroundColor = .green
|
||||
subView4.translatesAutoresizingMaskIntoConstraints = false
|
||||
container.addSubview(subView4)
|
||||
|
||||
container.addConstraints([
|
||||
NSLayoutConstraint(item: subView4, attribute: .right, relatedBy: .equal, toItem: container, attribute: .right, multiplier: 1, constant: -10),
|
||||
NSLayoutConstraint(item: subView4, attribute: .centerY, relatedBy: .equal, toItem: container, attribute: .centerY, multiplier: 1, constant: 0),
|
||||
NSLayoutConstraint(item: subView4, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 50),
|
||||
NSLayoutConstraint(item: subView4, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 50)
|
||||
])
|
||||
}
|
||||
}
|
@@ -18,12 +18,12 @@ private final class ExampleModel {
|
||||
}
|
||||
}
|
||||
|
||||
extension ExampleModel: IGListDiffable {
|
||||
extension ExampleModel: ListDiffable {
|
||||
fileprivate func diffIdentifier() -> NSObjectProtocol {
|
||||
return title as NSString
|
||||
}
|
||||
|
||||
fileprivate func isEqual(toDiffableObject object: IGListDiffable?) -> Bool {
|
||||
fileprivate func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
|
||||
guard let otherObj = object as? ExampleModel else { return false }
|
||||
|
||||
return (title == otherObj.title) &&
|
||||
@@ -31,22 +31,24 @@ extension ExampleModel: IGListDiffable {
|
||||
}
|
||||
}
|
||||
|
||||
final class ExamplesViewController: UIViewController, IGListAdapterDataSource, IGListSingleSectionControllerDelegate {
|
||||
private lazy var adapter: IGListAdapter = {
|
||||
return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0)
|
||||
final class ExamplesViewController: UIViewController, ListAdapterDataSource, ListSingleSectionControllerDelegate {
|
||||
private lazy var adapter: ListAdapter = {
|
||||
return ListAdapter(updater: ListAdapterUpdater(), viewController: self, workingRangeSize: 0)
|
||||
}()
|
||||
private let collectionView = IGListCollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())
|
||||
private let collectionView = ListCollectionView(frame: .zero)
|
||||
|
||||
|
||||
// Update this to array to create more examples.
|
||||
private let models: [ExampleModel] = [ExampleModel(title: "Basic Layout", controllerClass: BasicViewController.self),
|
||||
ExampleModel(title: "Exclude Views in Layout", controllerClass: LayoutInclusionViewController.self)]
|
||||
ExampleModel(title: "Exclude Views in Layout", controllerClass: LayoutInclusionViewController.self),
|
||||
ExampleModel(title: "AutoLayout Mixed", controllerClass: AutoLayoutMixedViewController.self)]
|
||||
|
||||
//MARK: UIViewController
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = "Examples"
|
||||
collectionView.backgroundColor = .clear
|
||||
view.addSubview(collectionView)
|
||||
adapter.collectionView = collectionView
|
||||
adapter.dataSource = self
|
||||
@@ -59,16 +61,16 @@ final class ExamplesViewController: UIViewController, IGListAdapterDataSource, I
|
||||
|
||||
//MARK: IGListAdapterDataSource
|
||||
|
||||
func objects(for listAdapter: IGListAdapter) -> [IGListDiffable] {
|
||||
return models as [IGListDiffable]
|
||||
func objects(for listAdapter: ListAdapter) -> [ListDiffable] {
|
||||
return models as [ListDiffable]
|
||||
}
|
||||
|
||||
func listAdapter(_ listAdapter: IGListAdapter, sectionControllerFor object: Any) -> IGListSectionController {
|
||||
let sizeBlock: IGListSingleSectionCellSizeBlock = { (model, context) in
|
||||
func listAdapter(_ listAdapter: ListAdapter, sectionControllerFor object: Any) -> ListSectionController {
|
||||
let sizeBlock: ListSingleSectionCellSizeBlock = { (model, context) in
|
||||
return CGSize(width: (context?.containerSize.width)!, height: 75.0)
|
||||
}
|
||||
|
||||
let configureBlock: IGListSingleSectionCellConfigureBlock = { (model, cell) in
|
||||
let configureBlock: ListSingleSectionCellConfigureBlock = { (model, cell) in
|
||||
guard let m = model as? ExampleModel, let c = cell as? SingleLabelCollectionCell else {
|
||||
return
|
||||
}
|
||||
@@ -76,18 +78,18 @@ final class ExamplesViewController: UIViewController, IGListAdapterDataSource, I
|
||||
c.label.text = m.title
|
||||
}
|
||||
|
||||
let sectionController = IGListSingleSectionController(cellClass: SingleLabelCollectionCell.self,
|
||||
let sectionController = ListSingleSectionController(cellClass: SingleLabelCollectionCell.self,
|
||||
configureBlock: configureBlock,
|
||||
sizeBlock: sizeBlock)
|
||||
sectionController.selectionDelegate = self
|
||||
return sectionController
|
||||
}
|
||||
|
||||
func emptyView(for listAdapter: IGListAdapter) -> UIView? { return nil }
|
||||
func emptyView(for listAdapter: ListAdapter) -> UIView? { return nil }
|
||||
|
||||
//MARK: IGListSingleSectionControllerDelegate
|
||||
|
||||
func didSelect(_ sectionController: IGListSingleSectionController) {
|
||||
func didSelect(_ sectionController: ListSingleSectionController, with object: Any) {
|
||||
let section = adapter.section(for: sectionController)
|
||||
let model = models[section]
|
||||
|
||||
|
@@ -32,5 +32,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@@ -10,14 +10,11 @@ import YogaKit
|
||||
|
||||
final class BasicViewController: UIViewController {
|
||||
override func viewDidLoad() {
|
||||
let containerSize = self.view.bounds.size
|
||||
|
||||
let root = self.view!
|
||||
root.backgroundColor = .white
|
||||
root.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.width = YGValue(containerSize.width)
|
||||
layout.height = YGValue(containerSize.height)
|
||||
layout.alignItems = .center
|
||||
layout.justifyContent = .center
|
||||
}
|
||||
@@ -32,22 +29,24 @@ final class BasicViewController: UIViewController {
|
||||
}
|
||||
root.addSubview(child1)
|
||||
|
||||
let child2 = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
|
||||
let child2 = UIView()
|
||||
child2.backgroundColor = .green
|
||||
child2.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.alignSelf = .flexEnd
|
||||
layout.width = 200
|
||||
layout.height = 200
|
||||
}
|
||||
root.addSubview(child2)
|
||||
|
||||
let child3 = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
|
||||
let child3 = UIView()
|
||||
child3.backgroundColor = .yellow
|
||||
child3.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.alignSelf = .flexStart
|
||||
layout.width = 100
|
||||
layout.height = 100
|
||||
}
|
||||
root.addSubview(child3)
|
||||
|
||||
root.yoga.applyLayout(preservingOrigin: true)
|
||||
}
|
||||
}
|
||||
|
@@ -51,9 +51,9 @@ final class LayoutInclusionViewController: UIViewController {
|
||||
}
|
||||
contentView.addSubview(disappearingView)
|
||||
|
||||
button.setTitle("Add Blue View", for: UIControlState.selected)
|
||||
button.setTitle("Remove Blue View", for: UIControlState.normal)
|
||||
button.addTarget(self, action: #selector(buttonWasTapped), for: UIControlEvents.touchUpInside)
|
||||
button.setTitle("Add Blue View", for: .selected)
|
||||
button.setTitle("Remove Blue View", for: .normal)
|
||||
button.addTarget(self, action: #selector(buttonWasTapped), for: UIControl.Event.touchUpInside)
|
||||
button.configureLayout { (layout) in
|
||||
layout.isEnabled = true
|
||||
layout.height = 300
|
||||
@@ -61,12 +61,10 @@ final class LayoutInclusionViewController: UIViewController {
|
||||
layout.alignSelf = .center
|
||||
}
|
||||
root.addSubview(button)
|
||||
|
||||
root.yoga.applyLayout(preservingOrigin: false)
|
||||
}
|
||||
|
||||
// MARK - UIButton Action
|
||||
func buttonWasTapped() {
|
||||
@objc func buttonWasTapped() {
|
||||
button.isSelected = !button.isSelected
|
||||
|
||||
button.isUserInteractionEnabled = false
|
||||
|
@@ -42,7 +42,6 @@ final class SingleLabelCollectionCell: UICollectionViewCell {
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
contentView.yoga.applyLayout(preservingOrigin: false)
|
||||
label.frame = contentView.bounds
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
17
YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h
Normal file
17
YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// YogaKitTVSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
|
||||
@end
|
||||
|
45
YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m
Normal file
45
YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m
Normal file
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// YogaKitTVSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"assets" : [
|
||||
{
|
||||
"filename" : "App Icon - App Store.imagestack",
|
||||
"idiom" : "tv",
|
||||
"role" : "primary-app-icon",
|
||||
"size" : "1280x768"
|
||||
},
|
||||
{
|
||||
"filename" : "App Icon.imagestack",
|
||||
"idiom" : "tv",
|
||||
"role" : "primary-app-icon",
|
||||
"size" : "400x240"
|
||||
},
|
||||
{
|
||||
"filename" : "Top Shelf Image Wide.imageset",
|
||||
"idiom" : "tv",
|
||||
"role" : "top-shelf-image-wide",
|
||||
"size" : "2320x720"
|
||||
},
|
||||
{
|
||||
"filename" : "Top Shelf Image.imageset",
|
||||
"idiom" : "tv",
|
||||
"role" : "top-shelf-image",
|
||||
"size" : "1920x720"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv-marketing",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv-marketing",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv-marketing",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv-marketing",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="13122.16" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="13122.16" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
34
YogaKit/YogaKitSample/YogaKitTVSample/Info.plist
Normal file
34
YogaKit/YogaKitSample/YogaKitTVSample/Info.plist
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Automatic</string>
|
||||
</dict>
|
||||
</plist>
|
15
YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h
Normal file
15
YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// ViewController.h
|
||||
// YogaKitTVSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
|
||||
|
||||
@end
|
||||
|
60
YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m
Normal file
60
YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m
Normal file
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ViewController.m
|
||||
// YogaKitTVSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
@import YogaKit;
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
UIView *root = self.view;
|
||||
root.backgroundColor = UIColor.whiteColor;
|
||||
[root configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignItems = YGAlignCenter;
|
||||
layout.justifyContent = YGJustifyCenter;
|
||||
}];
|
||||
|
||||
UIView *child1 = [[UIView alloc] init];
|
||||
child1.backgroundColor = UIColor.blueColor;
|
||||
[child1 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.width = YGPointValue(100);
|
||||
layout.height = YGPointValue(10);
|
||||
layout.marginBottom = YGPointValue(25);
|
||||
}];
|
||||
[root addSubview:child1];
|
||||
|
||||
UIView *child2 = [[UIView alloc] init];
|
||||
child2.backgroundColor = UIColor.greenColor;
|
||||
[child2 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignSelf = YGAlignFlexEnd;
|
||||
layout.width = YGPointValue(200);
|
||||
layout.height = YGPointValue(200);
|
||||
}];
|
||||
[root addSubview:child2];
|
||||
|
||||
UIView *child3 = [[UIView alloc] init];
|
||||
child3.backgroundColor = UIColor.yellowColor;
|
||||
[child3 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
|
||||
layout.isEnabled = YES;
|
||||
layout.alignSelf = YGAlignFlexStart;
|
||||
layout.width = YGPointValue(100);
|
||||
layout.height = YGPointValue(100);
|
||||
}];
|
||||
[root addSubview:child3];
|
||||
}
|
||||
|
||||
@end
|
1
YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift
Normal file
1
YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift
Normal file
@@ -0,0 +1 @@
|
||||
|
19
YogaKit/YogaKitSample/YogaKitTVSample/main.m
Normal file
19
YogaKit/YogaKitSample/YogaKitTVSample/main.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// main.m
|
||||
// YogaKitTVSample
|
||||
//
|
||||
// Created by lvv on 2020/8/13.
|
||||
// Copyright © 2020 facebook. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
NSString * appDelegateClassName;
|
||||
@autoreleasepool {
|
||||
// Setup code that might create autoreleased objects goes here.
|
||||
appDelegateClassName = NSStringFromClass([AppDelegate class]);
|
||||
}
|
||||
return UIApplicationMain(argc, argv, nil, appDelegateClassName);
|
||||
}
|
1
YogaKit/yoga
Symbolic link
1
YogaKit/yoga
Symbolic link
@@ -0,0 +1 @@
|
||||
../yoga
|
@@ -646,9 +646,9 @@ static void YGTransferLayoutDirection(YGNodeRef node, jobject javaNode) {
|
||||
|
||||
static YGSize YGJNIMeasureFunc(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode,
|
||||
void* layoutContext) {
|
||||
if (auto obj = YGNodeJobject(node, layoutContext)) {
|
||||
@@ -694,10 +694,10 @@ static void jni_YGNodeSetHasMeasureFuncJNI(
|
||||
->setMeasureFunc(hasMeasureFunc ? YGJNIMeasureFunc : nullptr);
|
||||
}
|
||||
|
||||
static float YGJNIBaselineFunc(
|
||||
static YGFloat YGJNIBaselineFunc(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
float height,
|
||||
YGFloat width,
|
||||
YGFloat height,
|
||||
void* layoutContext) {
|
||||
if (auto obj = YGNodeJobject(node, layoutContext)) {
|
||||
JNIEnv* env = getCurrentEnv();
|
||||
|
@@ -251,7 +251,7 @@ TEST_F(EventTest, layout_events_has_max_measure_cache) {
|
||||
TEST_F(EventTest, measure_functions_get_wrapped) {
|
||||
auto root = YGNodeNew();
|
||||
YGNodeSetMeasureFunc(
|
||||
root, [](YGNodeRef, float, YGMeasureMode, float, YGMeasureMode) {
|
||||
root, [](YGNodeRef, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode) {
|
||||
return YGSize{};
|
||||
});
|
||||
|
||||
@@ -269,7 +269,7 @@ TEST_F(EventTest, baseline_functions_get_wrapped) {
|
||||
auto child = YGNodeNew();
|
||||
YGNodeInsertChild(root, child, 0);
|
||||
|
||||
YGNodeSetBaselineFunc(child, [](YGNodeRef, float, float) { return 0.0f; });
|
||||
YGNodeSetBaselineFunc(child, [](YGNodeRef, YGFloat, YGFloat) { return 0.0; });
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
|
||||
|
@@ -9,18 +9,18 @@
|
||||
#include <yoga/YGNode.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
static float _baselineFunc(
|
||||
static YGFloat _baselineFunc(
|
||||
YGNodeRef node,
|
||||
const float width,
|
||||
const float height) {
|
||||
const YGFloat width,
|
||||
const YGFloat height) {
|
||||
return height / 2;
|
||||
}
|
||||
|
||||
static YGSize _measure1(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
.width = 42,
|
||||
@@ -30,9 +30,9 @@ static YGSize _measure1(
|
||||
|
||||
static YGSize _measure2(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
.width = 279,
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
static YGSize _measure(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
.width = widthMode == YGMeasureModeExactly ? width : 50,
|
||||
|
@@ -9,8 +9,8 @@
|
||||
#include <yoga/YGNode.h>
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
static float _baseline(YGNodeRef node, const float width, const float height) {
|
||||
float* baseline = (float*) node->getContext();
|
||||
static YGFloat _baseline(YGNodeRef node, const YGFloat width, const YGFloat height) {
|
||||
YGFloat* baseline = (YGFloat*) node->getContext();
|
||||
return *baseline;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ TEST(YogaTest, align_baseline_customer_func) {
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
float baselineValue = 10;
|
||||
YGFloat baselineValue = 10;
|
||||
const YGNodeRef root_child1_child0 = YGNodeNew();
|
||||
root_child1_child0->setContext(&baselineValue);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
static YGSize _measureMax(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
int* measureCount = (int*) node->getContext();
|
||||
(*measureCount)++;
|
||||
@@ -26,9 +26,9 @@ static YGSize _measureMax(
|
||||
|
||||
static YGSize _measureMin(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
int* measureCount = (int*) node->getContext();
|
||||
*measureCount = *measureCount + 1;
|
||||
@@ -46,9 +46,9 @@ static YGSize _measureMin(
|
||||
|
||||
static YGSize _measure_84_49(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
int* measureCount = (int*) node->getContext();
|
||||
if (measureCount) {
|
||||
|
@@ -10,9 +10,9 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
struct _MeasureConstraint {
|
||||
float width;
|
||||
YGFloat width;
|
||||
YGMeasureMode widthMode;
|
||||
float height;
|
||||
YGFloat height;
|
||||
YGMeasureMode heightMode;
|
||||
};
|
||||
|
||||
@@ -23,9 +23,9 @@ struct _MeasureConstraintList {
|
||||
|
||||
static YGSize _measure(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
struct _MeasureConstraintList* constraintList =
|
||||
(struct _MeasureConstraintList*) node->getContext();
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
static YGSize _measure(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
int* measureCount = (int*) node->getContext();
|
||||
if (measureCount) {
|
||||
@@ -28,9 +28,9 @@ static YGSize _measure(
|
||||
|
||||
static YGSize _simulate_wrapping_text(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
if (widthMode == YGMeasureModeUndefined || width >= 68) {
|
||||
return YGSize{.width = 68, .height = 16};
|
||||
@@ -44,9 +44,9 @@ static YGSize _simulate_wrapping_text(
|
||||
|
||||
static YGSize _measure_assert_negative(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
EXPECT_GE(width, 0);
|
||||
EXPECT_GE(height, 0);
|
||||
@@ -643,9 +643,9 @@ TEST(YogaTest, cant_call_negative_measure_horizontal) {
|
||||
|
||||
static YGSize _measure_90_10(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
|
||||
return YGSize{
|
||||
@@ -656,9 +656,9 @@ static YGSize _measure_90_10(
|
||||
|
||||
static YGSize _measure_100_100(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
|
||||
return YGSize{
|
||||
|
@@ -1298,9 +1298,9 @@ TEST(YogaTest, min_max_percent_no_width_height) {
|
||||
|
||||
static YGSize _measureCk_test_label_shrink_based_on_height(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
|
||||
if (heightMode == YGMeasureModeAtMost) {
|
||||
|
@@ -22,7 +22,7 @@ TEST(YGNode, hasMeasureFunc_initial) {
|
||||
|
||||
TEST(YGNode, hasMeasureFunc_with_measure_fn) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc([](YGNode*, float, YGMeasureMode, float, YGMeasureMode) {
|
||||
n.setMeasureFunc([](YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode) {
|
||||
return YGSize{};
|
||||
});
|
||||
ASSERT_TRUE(n.hasMeasureFunc());
|
||||
@@ -32,7 +32,7 @@ TEST(YGNode, measure_with_measure_fn) {
|
||||
auto n = YGNode{};
|
||||
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float w, YGMeasureMode wm, float h, YGMeasureMode hm) {
|
||||
[](YGNode*, YGFloat w, YGMeasureMode wm, YGFloat h, YGMeasureMode hm) {
|
||||
return YGSize{w * wm, h / hm};
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST(YGNode, measure_with_measure_fn) {
|
||||
TEST(YGNode, measure_with_context_measure_fn) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float, YGMeasureMode, float, YGMeasureMode, void* ctx) {
|
||||
[](YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode, void* ctx) {
|
||||
return *(YGSize*) ctx;
|
||||
});
|
||||
|
||||
@@ -57,11 +57,11 @@ TEST(YGNode, measure_with_context_measure_fn) {
|
||||
TEST(YGNode, switching_measure_fn_types) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float, YGMeasureMode, float, YGMeasureMode, void*) {
|
||||
[](YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode, void*) {
|
||||
return YGSize{};
|
||||
});
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float w, YGMeasureMode wm, float h, YGMeasureMode hm) {
|
||||
[](YGNode*, YGFloat w, YGMeasureMode wm, YGFloat h, YGMeasureMode hm) {
|
||||
return YGSize{w * wm, h / hm};
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ TEST(YGNode, switching_measure_fn_types) {
|
||||
|
||||
TEST(YGNode, hasMeasureFunc_after_unset) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc([](YGNode*, float, YGMeasureMode, float, YGMeasureMode) {
|
||||
n.setMeasureFunc([](YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode) {
|
||||
return YGSize{};
|
||||
});
|
||||
|
||||
@@ -83,7 +83,7 @@ TEST(YGNode, hasMeasureFunc_after_unset) {
|
||||
TEST(YGNode, hasMeasureFunc_after_unset_context) {
|
||||
auto n = YGNode{};
|
||||
n.setMeasureFunc(
|
||||
[](YGNode*, float, YGMeasureMode, float, YGMeasureMode, void*) {
|
||||
[](YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode, void*) {
|
||||
return YGSize{};
|
||||
});
|
||||
|
||||
@@ -98,20 +98,20 @@ TEST(YGNode, hasBaselineFunc_initial) {
|
||||
|
||||
TEST(YGNode, hasBaselineFunc_with_baseline_fn) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float, float) { return 0.0f; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat, YGFloat) { return 0.0; });
|
||||
ASSERT_TRUE(n.hasBaselineFunc());
|
||||
}
|
||||
|
||||
TEST(YGNode, baseline_with_baseline_fn) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float w, float h) { return w + h; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat w, YGFloat h) { return w + h; });
|
||||
|
||||
ASSERT_EQ(n.baseline(1.25f, 2.5f, nullptr), 3.75f);
|
||||
}
|
||||
|
||||
TEST(YGNode, baseline_with_context_baseline_fn) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float w, float h, void* ctx) {
|
||||
n.setBaselineFunc([](YGNode*, YGFloat w, YGFloat h, void* ctx) {
|
||||
return w + h + *(float*) ctx;
|
||||
});
|
||||
|
||||
@@ -121,7 +121,7 @@ TEST(YGNode, baseline_with_context_baseline_fn) {
|
||||
|
||||
TEST(YGNode, hasBaselineFunc_after_unset) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float, float) { return 0.0f; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat, YGFloat) { return 0.0; });
|
||||
|
||||
n.setBaselineFunc(nullptr);
|
||||
ASSERT_FALSE(n.hasBaselineFunc());
|
||||
@@ -129,7 +129,7 @@ TEST(YGNode, hasBaselineFunc_after_unset) {
|
||||
|
||||
TEST(YGNode, hasBaselineFunc_after_unset_context) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float, float, void*) { return 0.0f; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat, YGFloat, void*) { return 0.0; });
|
||||
|
||||
n.setMeasureFunc(nullptr);
|
||||
ASSERT_FALSE(n.hasMeasureFunc());
|
||||
@@ -137,8 +137,8 @@ TEST(YGNode, hasBaselineFunc_after_unset_context) {
|
||||
|
||||
TEST(YGNode, switching_baseline_fn_types) {
|
||||
auto n = YGNode{};
|
||||
n.setBaselineFunc([](YGNode*, float, float, void*) { return 0.0f; });
|
||||
n.setBaselineFunc([](YGNode*, float, float) { return 1.0f; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat, YGFloat, void*) { return 0.0; });
|
||||
n.setBaselineFunc([](YGNode*, YGFloat, YGFloat) { return 1.0; });
|
||||
ASSERT_EQ(n.baseline(1, 2, nullptr), 1.0f);
|
||||
}
|
||||
|
||||
|
@@ -1196,9 +1196,9 @@ TEST(YogaTest, percent_absolute_position) {
|
||||
|
||||
static YGSize _measureCk_test_label_shrink_based_on_height(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
|
||||
if (heightMode == YGMeasureModeAtMost) {
|
||||
|
@@ -44,9 +44,9 @@ TEST(YogaTest, rounding_value) {
|
||||
|
||||
static YGSize measureText(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return (YGSize){.width = 10, .height = 10};
|
||||
}
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
static YGSize _measureFloor(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
width = 10.2f,
|
||||
@@ -23,9 +23,9 @@ static YGSize _measureFloor(
|
||||
|
||||
static YGSize _measureCeil(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
width = 10.5f,
|
||||
@@ -35,9 +35,9 @@ static YGSize _measureCeil(
|
||||
|
||||
static YGSize _measureFractial(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
width = 0.5f,
|
||||
|
@@ -112,9 +112,9 @@ public:
|
||||
case AUTO_BITS:
|
||||
return YGValueAuto;
|
||||
case ZERO_BITS_POINT:
|
||||
return YGValue{0.0f, YGUnitPoint};
|
||||
return YGValue{0.0, YGUnitPoint};
|
||||
case ZERO_BITS_PERCENT:
|
||||
return YGValue{0.0f, YGUnitPercent};
|
||||
return YGValue{0.0, YGUnitPercent};
|
||||
}
|
||||
|
||||
if (std::isnan(payload_.value)) {
|
||||
|
@@ -18,16 +18,16 @@ YGFlexDirection YGFlexDirectionCross(
|
||||
: YGFlexDirectionColumn;
|
||||
}
|
||||
|
||||
float YGFloatMax(const float a, const float b) {
|
||||
YGFloat YGFloatMax(const YGFloat a, const YGFloat b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fmaxf(a, b);
|
||||
return fmax(a, b);
|
||||
}
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
}
|
||||
|
||||
float YGFloatMin(const float a, const float b) {
|
||||
YGFloat YGFloatMin(const YGFloat a, const YGFloat b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fminf(a, b);
|
||||
return fmin(a, b);
|
||||
}
|
||||
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
@@ -46,7 +46,7 @@ bool YGValueEqual(const YGValue& a, const YGValue& b) {
|
||||
return fabs(a.value - b.value) < 0.0001f;
|
||||
}
|
||||
|
||||
bool YGFloatsEqual(const float a, const float b) {
|
||||
bool YGFloatsEqual(const YGFloat a, const YGFloat b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fabs(a - b) < 0.0001f;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ bool YGDoubleEqual(const double a, const double b) {
|
||||
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
||||
}
|
||||
|
||||
float YGFloatSanitize(const float val) {
|
||||
YGFloat YGFloatSanitize(const YGFloat val) {
|
||||
return yoga::isUndefined(val) ? 0 : val;
|
||||
}
|
||||
|
||||
|
36
yoga/Utils.h
36
yoga/Utils.h
@@ -38,19 +38,19 @@
|
||||
|
||||
struct YGCollectFlexItemsRowValues {
|
||||
uint32_t itemsOnLine;
|
||||
float sizeConsumedOnCurrentLine;
|
||||
float totalFlexGrowFactors;
|
||||
float totalFlexShrinkScaledFactors;
|
||||
YGFloat sizeConsumedOnCurrentLine;
|
||||
YGFloat totalFlexGrowFactors;
|
||||
YGFloat totalFlexShrinkScaledFactors;
|
||||
uint32_t endOfLineIndex;
|
||||
std::vector<YGNodeRef> relativeChildren;
|
||||
float remainingFreeSpace;
|
||||
YGFloat remainingFreeSpace;
|
||||
// The size of the mainDim for the row after considering size, padding, margin
|
||||
// and border of flex items. This is used to calculate maxLineDim after going
|
||||
// through all the rows to decide on the main axis size of owner.
|
||||
float mainDim;
|
||||
YGFloat mainDim;
|
||||
// The size of the crossDim for the row after considering size, padding,
|
||||
// margin and border of flex items. Used for calculating containers crossSize.
|
||||
float crossDim;
|
||||
YGFloat crossDim;
|
||||
};
|
||||
|
||||
bool YGValueEqual(const YGValue& a, const YGValue& b);
|
||||
@@ -60,27 +60,27 @@ inline bool YGValueEqual(
|
||||
return YGValueEqual((YGValue) a, (YGValue) b);
|
||||
}
|
||||
|
||||
// This custom float equality function returns true if either absolute
|
||||
// This custom YGFloat equality function returns true if either absolute
|
||||
// difference between two floats is less than 0.0001f or both are undefined.
|
||||
bool YGFloatsEqual(const float a, const float b);
|
||||
bool YGFloatsEqual(const YGFloat a, const YGFloat b);
|
||||
|
||||
bool YGDoubleEqual(const double a, const double b);
|
||||
|
||||
float YGFloatMax(const float a, const float b);
|
||||
YGFloat YGFloatMax(const YGFloat a, const YGFloat b);
|
||||
|
||||
YGFloatOptional YGFloatOptionalMax(
|
||||
const YGFloatOptional op1,
|
||||
const YGFloatOptional op2);
|
||||
|
||||
float YGFloatMin(const float a, const float b);
|
||||
YGFloat YGFloatMin(const YGFloat a, const YGFloat b);
|
||||
|
||||
// This custom float comparison function compares the array of float with
|
||||
// YGFloatsEqual, as the default float comparison operator will not work(Look
|
||||
// This custom YGFloat comparison function compares the array of YGFloat with
|
||||
// YGFloatsEqual, as the default YGFloat comparison operator will not work(Look
|
||||
// at the comments of YGFloatsEqual function).
|
||||
template <std::size_t size>
|
||||
bool YGFloatArrayEqual(
|
||||
const std::array<float, size>& val1,
|
||||
const std::array<float, size>& val2) {
|
||||
const std::array<YGFloat, size>& val1,
|
||||
const std::array<YGFloat, size>& val2) {
|
||||
bool areEqual = true;
|
||||
for (std::size_t i = 0; i < size && areEqual; ++i) {
|
||||
areEqual = YGFloatsEqual(val1[i], val2[i]);
|
||||
@@ -89,7 +89,7 @@ bool YGFloatArrayEqual(
|
||||
}
|
||||
|
||||
// This function returns 0 if YGFloatIsUndefined(val) is true and val otherwise
|
||||
float YGFloatSanitize(const float val);
|
||||
YGFloat YGFloatSanitize(const YGFloat val);
|
||||
|
||||
YGFlexDirection YGFlexDirectionCross(
|
||||
const YGFlexDirection flexDirection,
|
||||
@@ -102,7 +102,7 @@ inline bool YGFlexDirectionIsRow(const YGFlexDirection flexDirection) {
|
||||
|
||||
inline YGFloatOptional YGResolveValue(
|
||||
const YGValue value,
|
||||
const float ownerSize) {
|
||||
const YGFloat ownerSize) {
|
||||
switch (value.unit) {
|
||||
case YGUnitPoint:
|
||||
return YGFloatOptional{value.value};
|
||||
@@ -115,7 +115,7 @@ inline YGFloatOptional YGResolveValue(
|
||||
|
||||
inline YGFloatOptional YGResolveValue(
|
||||
yoga::detail::CompactValue value,
|
||||
float ownerSize) {
|
||||
YGFloat ownerSize) {
|
||||
return YGResolveValue((YGValue) value, ownerSize);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ inline YGFlexDirection YGResolveFlexDirection(
|
||||
|
||||
inline YGFloatOptional YGResolveValueMargin(
|
||||
yoga::detail::CompactValue value,
|
||||
const float ownerSize) {
|
||||
const YGFloat ownerSize) {
|
||||
return value.isAuto() ? YGFloatOptional{0} : YGResolveValue(value, ownerSize);
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
bool useLegacyStretchBehaviour = false;
|
||||
bool shouldDiffLayoutWithoutLegacyStretchBehaviour = false;
|
||||
bool printTree = false;
|
||||
float pointScaleFactor = 1.0f;
|
||||
YGFloat pointScaleFactor = 1.0f;
|
||||
std::array<bool, facebook::yoga::enums::count<YGExperimentalFeature>()>
|
||||
experimentalFeatures = {};
|
||||
void* context = nullptr;
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include "YGMacros.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
YG_EXTERN_CXX_BEGIN
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace enums {
|
||||
@@ -27,6 +28,7 @@ constexpr int n() {
|
||||
} // namespace enums
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
YG_EXTERN_C_END
|
||||
#endif
|
||||
|
||||
#define YG_ENUM_DECL(NAME, ...) \
|
||||
@@ -37,6 +39,7 @@ constexpr int n() {
|
||||
#define YG_ENUM_SEQ_DECL(NAME, ...) \
|
||||
YG_ENUM_DECL(NAME, __VA_ARGS__) \
|
||||
YG_EXTERN_C_END \
|
||||
YG_EXTERN_CXX_BEGIN \
|
||||
namespace facebook { \
|
||||
namespace yoga { \
|
||||
namespace enums { \
|
||||
@@ -47,6 +50,7 @@ constexpr int n() {
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
YG_EXTERN_C_END \
|
||||
YG_EXTERN_C_BEGIN
|
||||
#else
|
||||
#define YG_ENUM_SEQ_DECL YG_ENUM_DECL
|
||||
|
@@ -13,14 +13,14 @@
|
||||
|
||||
struct YGFloatOptional {
|
||||
private:
|
||||
float value_ = std::numeric_limits<float>::quiet_NaN();
|
||||
YGFloat value_ = std::numeric_limits<YGFloat>::quiet_NaN();
|
||||
|
||||
public:
|
||||
explicit constexpr YGFloatOptional(float value) : value_(value) {}
|
||||
explicit constexpr YGFloatOptional(YGFloat value) : value_(value) {}
|
||||
constexpr YGFloatOptional() = default;
|
||||
|
||||
// returns the wrapped value, or a value x with YGIsUndefined(x) == true
|
||||
constexpr float unwrap() const { return value_; }
|
||||
constexpr YGFloat unwrap() const { return value_; }
|
||||
|
||||
bool isUndefined() const { return std::isnan(value_); }
|
||||
};
|
||||
@@ -35,17 +35,17 @@ inline bool operator!=(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline bool operator==(YGFloatOptional lhs, float rhs) {
|
||||
inline bool operator==(YGFloatOptional lhs, YGFloat rhs) {
|
||||
return lhs == YGFloatOptional{rhs};
|
||||
}
|
||||
inline bool operator!=(YGFloatOptional lhs, float rhs) {
|
||||
inline bool operator!=(YGFloatOptional lhs, YGFloat rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline bool operator==(float lhs, YGFloatOptional rhs) {
|
||||
inline bool operator==(YGFloat lhs, YGFloatOptional rhs) {
|
||||
return rhs == lhs;
|
||||
}
|
||||
inline bool operator!=(float lhs, YGFloatOptional rhs) {
|
||||
inline bool operator!=(YGFloat lhs, YGFloatOptional rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
|
@@ -13,11 +13,11 @@
|
||||
using namespace facebook::yoga;
|
||||
|
||||
struct YGLayout {
|
||||
std::array<float, 4> position = {};
|
||||
std::array<float, 2> dimensions = {{YGUndefined, YGUndefined}};
|
||||
std::array<float, 4> margin = {};
|
||||
std::array<float, 4> border = {};
|
||||
std::array<float, 4> padding = {};
|
||||
std::array<YGFloat, 4> position = {};
|
||||
std::array<YGFloat, 2> dimensions = {{YGUndefined, YGUndefined}};
|
||||
std::array<YGFloat, 4> margin = {};
|
||||
std::array<YGFloat, 4> border = {};
|
||||
std::array<YGFloat, 4> padding = {};
|
||||
|
||||
private:
|
||||
static constexpr size_t directionOffset = 0;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
uint32_t nextCachedMeasurementsIndex = 0;
|
||||
std::array<YGCachedMeasurement, YG_MAX_CACHED_RESULT_COUNT>
|
||||
cachedMeasurements = {};
|
||||
std::array<float, 2> measuredDimensions = {{YGUndefined, YGUndefined}};
|
||||
std::array<YGFloat, 2> measuredDimensions = {{YGUndefined, YGUndefined}};
|
||||
|
||||
YGCachedMeasurement cachedLayout = YGCachedMeasurement();
|
||||
|
||||
|
@@ -7,10 +7,27 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__LP64__) && __LP64__
|
||||
# define YGFLOAT_TYPE double
|
||||
# define YGFLOAT_IS_DOUBLE 1
|
||||
# define YGFLOAT_MIN DBL_MIN
|
||||
# define YGFLOAT_MAX DBL_MAX
|
||||
#else
|
||||
# define YGFLOAT_TYPE float
|
||||
# define YGFLOAT_IS_DOUBLE 0
|
||||
# define YGFLOAT_MIN FLT_MIN
|
||||
# define YGFLOAT_MAX FLT_MAX
|
||||
#endif
|
||||
|
||||
typedef YGFLOAT_TYPE YGFloat;
|
||||
#define YGFLOAT_DEFINED 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define YG_EXTERN_CXX_BEGIN extern "C++" {
|
||||
#define YG_EXTERN_C_BEGIN extern "C" {
|
||||
#define YG_EXTERN_C_END }
|
||||
#else
|
||||
#define YG_EXTERN_CXX_BEGIN
|
||||
#define YG_EXTERN_C_BEGIN
|
||||
#define YG_EXTERN_C_END
|
||||
#endif
|
||||
|
@@ -52,7 +52,7 @@ void YGNode::print(void* printContext) {
|
||||
|
||||
YGFloatOptional YGNode::getLeadingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const {
|
||||
const YGFloat axisSize) const {
|
||||
if (YGFlexDirectionIsRow(axis)) {
|
||||
auto leadingPosition = YGComputedEdgeValue(
|
||||
style_.position(), YGEdgeStart, CompactValue::ofUndefined());
|
||||
@@ -71,7 +71,7 @@ YGFloatOptional YGNode::getLeadingPosition(
|
||||
|
||||
YGFloatOptional YGNode::getTrailingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const {
|
||||
const YGFloat axisSize) const {
|
||||
if (YGFlexDirectionIsRow(axis)) {
|
||||
auto trailingPosition = YGComputedEdgeValue(
|
||||
style_.position(), YGEdgeEnd, CompactValue::ofUndefined());
|
||||
@@ -110,7 +110,7 @@ bool YGNode::isTrailingPosDefined(const YGFlexDirection axis) const {
|
||||
|
||||
YGFloatOptional YGNode::getLeadingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
!style_.margin()[YGEdgeStart].isUndefined()) {
|
||||
return YGResolveValueMargin(style_.margin()[YGEdgeStart], widthSize);
|
||||
@@ -124,7 +124,7 @@ YGFloatOptional YGNode::getLeadingMargin(
|
||||
|
||||
YGFloatOptional YGNode::getTrailingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
if (YGFlexDirectionIsRow(axis) && !style_.margin()[YGEdgeEnd].isUndefined()) {
|
||||
return YGResolveValueMargin(style_.margin()[YGEdgeEnd], widthSize);
|
||||
}
|
||||
@@ -137,14 +137,14 @@ YGFloatOptional YGNode::getTrailingMargin(
|
||||
|
||||
YGFloatOptional YGNode::getMarginForAxis(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
return getLeadingMargin(axis, widthSize) + getTrailingMargin(axis, widthSize);
|
||||
}
|
||||
|
||||
YGSize YGNode::measure(
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode,
|
||||
void* layoutContext) {
|
||||
|
||||
@@ -154,7 +154,7 @@ YGSize YGNode::measure(
|
||||
: measure_.noContext(this, width, widthMode, height, heightMode);
|
||||
}
|
||||
|
||||
float YGNode::baseline(float width, float height, void* layoutContext) {
|
||||
YGFloat YGNode::baseline(YGFloat width, YGFloat height, void* layoutContext) {
|
||||
return facebook::yoga::detail::getBooleanData(flags, baselineUsesContext_)
|
||||
? baseline_.withContext(this, width, height, layoutContext)
|
||||
: baseline_.noContext(this, width, height);
|
||||
@@ -235,15 +235,15 @@ void YGNode::setLayoutDirection(YGDirection direction) {
|
||||
layout_.setDirection(direction);
|
||||
}
|
||||
|
||||
void YGNode::setLayoutMargin(float margin, int index) {
|
||||
void YGNode::setLayoutMargin(YGFloat margin, int index) {
|
||||
layout_.margin[index] = margin;
|
||||
}
|
||||
|
||||
void YGNode::setLayoutBorder(float border, int index) {
|
||||
void YGNode::setLayoutBorder(YGFloat border, int index) {
|
||||
layout_.border[index] = border;
|
||||
}
|
||||
|
||||
void YGNode::setLayoutPadding(float padding, int index) {
|
||||
void YGNode::setLayoutPadding(YGFloat padding, int index) {
|
||||
layout_.padding[index] = padding;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ void YGNode::setLayoutComputedFlexBasis(
|
||||
layout_.computedFlexBasis = computedFlexBasis;
|
||||
}
|
||||
|
||||
void YGNode::setLayoutPosition(float position, int index) {
|
||||
void YGNode::setLayoutPosition(YGFloat position, int index) {
|
||||
layout_.position[index] = position;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ void YGNode::setLayoutComputedFlexBasisGeneration(
|
||||
layout_.computedFlexBasisGeneration = computedFlexBasisGeneration;
|
||||
}
|
||||
|
||||
void YGNode::setLayoutMeasuredDimension(float measuredDimension, int index) {
|
||||
void YGNode::setLayoutMeasuredDimension(YGFloat measuredDimension, int index) {
|
||||
layout_.measuredDimensions[index] = measuredDimension;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ void YGNode::setLayoutHadOverflow(bool hadOverflow) {
|
||||
layout_.setHadOverflow(hadOverflow);
|
||||
}
|
||||
|
||||
void YGNode::setLayoutDimension(float dimension, int index) {
|
||||
void YGNode::setLayoutDimension(YGFloat dimension, int index) {
|
||||
layout_.dimensions[index] = dimension;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ void YGNode::setLayoutDimension(float dimension, int index) {
|
||||
// -right depending on which is defined.
|
||||
YGFloatOptional YGNode::relativePosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const {
|
||||
const YGFloat axisSize) const {
|
||||
if (isLeadingPositionDefined(axis)) {
|
||||
return getLeadingPosition(axis, axisSize);
|
||||
}
|
||||
@@ -295,9 +295,9 @@ YGFloatOptional YGNode::relativePosition(
|
||||
|
||||
void YGNode::setPosition(
|
||||
const YGDirection direction,
|
||||
const float mainSize,
|
||||
const float crossSize,
|
||||
const float ownerWidth) {
|
||||
const YGFloat mainSize,
|
||||
const YGFloat crossSize,
|
||||
const YGFloat ownerWidth) {
|
||||
/* Root nodes should be always layouted as LTR, so we don't return negative
|
||||
* values. */
|
||||
const YGDirection directionRespectingRoot =
|
||||
@@ -411,7 +411,7 @@ void YGNode::markDirtyAndPropogateDownwards() {
|
||||
});
|
||||
}
|
||||
|
||||
float YGNode::resolveFlexGrow() const {
|
||||
YGFloat YGNode::resolveFlexGrow() const {
|
||||
// Root nodes flexGrow should always be 0
|
||||
if (owner_ == nullptr) {
|
||||
return 0.0;
|
||||
@@ -425,7 +425,7 @@ float YGNode::resolveFlexGrow() const {
|
||||
return kDefaultFlexGrow;
|
||||
}
|
||||
|
||||
float YGNode::resolveFlexShrink() const {
|
||||
YGFloat YGNode::resolveFlexShrink() const {
|
||||
if (owner_ == nullptr) {
|
||||
return 0.0;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ bool YGNode::isNodeFlexible() {
|
||||
(resolveFlexGrow() != 0 || resolveFlexShrink() != 0));
|
||||
}
|
||||
|
||||
float YGNode::getLeadingBorder(const YGFlexDirection axis) const {
|
||||
YGFloat YGNode::getLeadingBorder(const YGFlexDirection axis) const {
|
||||
YGValue leadingBorder;
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
!style_.border()[YGEdgeStart].isUndefined()) {
|
||||
@@ -462,7 +462,7 @@ float YGNode::getLeadingBorder(const YGFlexDirection axis) const {
|
||||
return YGFloatMax(leadingBorder.value, 0.0f);
|
||||
}
|
||||
|
||||
float YGNode::getTrailingBorder(const YGFlexDirection flexDirection) const {
|
||||
YGFloat YGNode::getTrailingBorder(const YGFlexDirection flexDirection) const {
|
||||
YGValue trailingBorder;
|
||||
if (YGFlexDirectionIsRow(flexDirection) &&
|
||||
!style_.border()[YGEdgeEnd].isUndefined()) {
|
||||
@@ -479,7 +479,7 @@ float YGNode::getTrailingBorder(const YGFlexDirection flexDirection) const {
|
||||
|
||||
YGFloatOptional YGNode::getLeadingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
const YGFloatOptional paddingEdgeStart =
|
||||
YGResolveValue(style_.padding()[YGEdgeStart], widthSize);
|
||||
if (YGFlexDirectionIsRow(axis) &&
|
||||
@@ -497,7 +497,7 @@ YGFloatOptional YGNode::getLeadingPadding(
|
||||
|
||||
YGFloatOptional YGNode::getTrailingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
const YGFloatOptional paddingEdgeEnd =
|
||||
YGResolveValue(style_.padding()[YGEdgeEnd], widthSize);
|
||||
if (YGFlexDirectionIsRow(axis) && paddingEdgeEnd >= YGFloatOptional{0.0f}) {
|
||||
@@ -514,14 +514,14 @@ YGFloatOptional YGNode::getTrailingPadding(
|
||||
|
||||
YGFloatOptional YGNode::getLeadingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
return getLeadingPadding(axis, widthSize) +
|
||||
YGFloatOptional(getLeadingBorder(axis));
|
||||
}
|
||||
|
||||
YGFloatOptional YGNode::getTrailingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const {
|
||||
const YGFloat widthSize) const {
|
||||
return getTrailingPadding(axis, widthSize) +
|
||||
YGFloatOptional(getTrailingBorder(axis));
|
||||
}
|
||||
|
@@ -23,8 +23,8 @@ YGConfigRef YGConfigGetDefault();
|
||||
|
||||
struct YOGA_EXPORT YGNode {
|
||||
using MeasureWithContextFn =
|
||||
YGSize (*)(YGNode*, float, YGMeasureMode, float, YGMeasureMode, void*);
|
||||
using BaselineWithContextFn = float (*)(YGNode*, float, float, void*);
|
||||
YGSize (*)(YGNode*, YGFloat, YGMeasureMode, YGFloat, YGMeasureMode, void*);
|
||||
using BaselineWithContextFn = YGFloat (*)(YGNode*, YGFloat, YGFloat, void*);
|
||||
using PrintWithContextFn = void (*)(YGNode*, void*);
|
||||
|
||||
private:
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
|
||||
YGFloatOptional relativePosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
const YGFloat axisSize) const;
|
||||
|
||||
void setMeasureFunc(decltype(measure_));
|
||||
void setBaselineFunc(decltype(baseline_));
|
||||
@@ -124,13 +124,13 @@ public:
|
||||
|
||||
bool hasMeasureFunc() const noexcept { return measure_.noContext != nullptr; }
|
||||
|
||||
YGSize measure(float, YGMeasureMode, float, YGMeasureMode, void*);
|
||||
YGSize measure(YGFloat, YGMeasureMode, YGFloat, YGMeasureMode, void*);
|
||||
|
||||
bool hasBaselineFunc() const noexcept {
|
||||
return baseline_.noContext != nullptr;
|
||||
}
|
||||
|
||||
float baseline(float width, float height, void* layoutContext);
|
||||
YGFloat baseline(YGFloat width, YGFloat height, void* layoutContext);
|
||||
|
||||
YGDirtiedFunc getDirtied() const { return dirtied_; }
|
||||
|
||||
@@ -196,35 +196,35 @@ public:
|
||||
// Methods related to positions, margin, padding and border
|
||||
YGFloatOptional getLeadingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
const YGFloat axisSize) const;
|
||||
bool isLeadingPositionDefined(const YGFlexDirection axis) const;
|
||||
bool isTrailingPosDefined(const YGFlexDirection axis) const;
|
||||
YGFloatOptional getTrailingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
const YGFloat axisSize) const;
|
||||
YGFloatOptional getLeadingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloatOptional getTrailingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
float getLeadingBorder(const YGFlexDirection flexDirection) const;
|
||||
float getTrailingBorder(const YGFlexDirection flexDirection) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloat getLeadingBorder(const YGFlexDirection flexDirection) const;
|
||||
YGFloat getTrailingBorder(const YGFlexDirection flexDirection) const;
|
||||
YGFloatOptional getLeadingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloatOptional getTrailingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloatOptional getLeadingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloatOptional getTrailingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
YGFloatOptional getMarginForAxis(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
const YGFloat widthSize) const;
|
||||
// Setters
|
||||
|
||||
void setContext(void* context) { context_ = context; }
|
||||
@@ -292,19 +292,19 @@ public:
|
||||
void setLayoutComputedFlexBasis(const YGFloatOptional computedFlexBasis);
|
||||
void setLayoutComputedFlexBasisGeneration(
|
||||
uint32_t computedFlexBasisGeneration);
|
||||
void setLayoutMeasuredDimension(float measuredDimension, int index);
|
||||
void setLayoutMeasuredDimension(YGFloat measuredDimension, int index);
|
||||
void setLayoutHadOverflow(bool hadOverflow);
|
||||
void setLayoutDimension(float dimension, int index);
|
||||
void setLayoutDimension(YGFloat dimension, int index);
|
||||
void setLayoutDirection(YGDirection direction);
|
||||
void setLayoutMargin(float margin, int index);
|
||||
void setLayoutBorder(float border, int index);
|
||||
void setLayoutPadding(float padding, int index);
|
||||
void setLayoutPosition(float position, int index);
|
||||
void setLayoutMargin(YGFloat margin, int index);
|
||||
void setLayoutBorder(YGFloat border, int index);
|
||||
void setLayoutPadding(YGFloat padding, int index);
|
||||
void setLayoutPosition(YGFloat position, int index);
|
||||
void setPosition(
|
||||
const YGDirection direction,
|
||||
const float mainSize,
|
||||
const float crossSize,
|
||||
const float ownerWidth);
|
||||
const YGFloat mainSize,
|
||||
const YGFloat crossSize,
|
||||
const YGFloat ownerWidth);
|
||||
void setLayoutDoesLegacyFlagAffectsLayout(bool doesLegacyFlagAffectsLayout);
|
||||
void setLayoutDidUseLegacyFlag(bool didUseLegacyFlag);
|
||||
void markDirtyAndPropogateDownwards();
|
||||
@@ -326,8 +326,8 @@ public:
|
||||
|
||||
void cloneChildrenIfNeeded(void*);
|
||||
void markDirtyAndPropogate();
|
||||
float resolveFlexGrow() const;
|
||||
float resolveFlexShrink() const;
|
||||
YGFloat resolveFlexGrow() const;
|
||||
YGFloat resolveFlexShrink() const;
|
||||
bool isNodeFlexible();
|
||||
bool didUseLegacyFlag();
|
||||
bool isLayoutTreeEqualToNode(const YGNode& node) const;
|
||||
|
@@ -15,22 +15,24 @@
|
||||
#define COMPILING_WITH_CLANG_ON_WINDOWS
|
||||
#endif
|
||||
#if defined(COMPILING_WITH_CLANG_ON_WINDOWS)
|
||||
YG_EXTERN_CXX_BEGIN
|
||||
#include <limits>
|
||||
constexpr float YGUndefined = std::numeric_limits<float>::quiet_NaN();
|
||||
constexpr YGFloat YGUndefined = std::numeric_limits<YGFloat>::quiet_NaN();
|
||||
YG_EXTERN_C_END
|
||||
#else
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
// Not defined in MSVC++
|
||||
#ifndef NAN
|
||||
static const uint32_t __nan = 0x7fc00000;
|
||||
#define NAN (*(const float*) __nan)
|
||||
#define NAN (*(const YGFloat*) __nan)
|
||||
#endif
|
||||
|
||||
#define YGUndefined NAN
|
||||
#endif
|
||||
|
||||
typedef struct YGValue {
|
||||
float value;
|
||||
YGFloat value;
|
||||
YGUnit unit;
|
||||
} YGValue;
|
||||
|
||||
@@ -44,6 +46,7 @@ YG_EXTERN_C_END
|
||||
#undef COMPILING_WITH_CLANG_ON_WINDOWS
|
||||
|
||||
#ifdef __cplusplus
|
||||
YG_EXTERN_CXX_BEGIN
|
||||
|
||||
inline bool operator==(const YGValue& lhs, const YGValue& rhs) {
|
||||
if (lhs.unit != rhs.unit) {
|
||||
@@ -75,14 +78,14 @@ namespace yoga {
|
||||
namespace literals {
|
||||
|
||||
inline YGValue operator"" _pt(long double value) {
|
||||
return YGValue{static_cast<float>(value), YGUnitPoint};
|
||||
return YGValue{static_cast<YGFloat>(value), YGUnitPoint};
|
||||
}
|
||||
inline YGValue operator"" _pt(unsigned long long value) {
|
||||
return operator"" _pt(static_cast<long double>(value));
|
||||
}
|
||||
|
||||
inline YGValue operator"" _percent(long double value) {
|
||||
return YGValue{static_cast<float>(value), YGUnitPercent};
|
||||
return YGValue{static_cast<YGFloat>(value), YGUnitPercent};
|
||||
}
|
||||
inline YGValue operator"" _percent(unsigned long long value) {
|
||||
return operator"" _percent(static_cast<long double>(value));
|
||||
@@ -92,4 +95,5 @@ inline YGValue operator"" _percent(unsigned long long value) {
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
|
||||
YG_EXTERN_C_END
|
||||
#endif
|
||||
|
@@ -19,8 +19,8 @@ YG_EXTERN_C_BEGIN
|
||||
|
||||
void YGNodeCalculateLayoutWithContext(
|
||||
YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
YGFloat availableWidth,
|
||||
YGFloat availableHeight,
|
||||
YGDirection ownerDirection,
|
||||
void* layoutContext);
|
||||
|
||||
@@ -29,7 +29,7 @@ YG_EXTERN_C_END
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
inline bool isUndefined(float value) {
|
||||
inline bool isUndefined(YGFloat value) {
|
||||
return std::isnan(value);
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ extern const YGValue YGValueAuto;
|
||||
extern const YGValue YGValueZero;
|
||||
|
||||
struct YGCachedMeasurement {
|
||||
float availableWidth;
|
||||
float availableHeight;
|
||||
YGFloat availableWidth;
|
||||
YGFloat availableHeight;
|
||||
YGMeasureMode widthMeasureMode;
|
||||
YGMeasureMode heightMeasureMode;
|
||||
|
||||
float computedWidth;
|
||||
float computedHeight;
|
||||
YGFloat computedWidth;
|
||||
YGFloat computedHeight;
|
||||
|
||||
YGCachedMeasurement()
|
||||
: availableWidth(-1),
|
||||
@@ -139,11 +139,11 @@ public:
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
|
||||
static const float kDefaultFlexGrow = 0.0f;
|
||||
static const float kDefaultFlexShrink = 0.0f;
|
||||
static const float kWebDefaultFlexShrink = 1.0f;
|
||||
static const YGFloat kDefaultFlexGrow = 0.0f;
|
||||
static const YGFloat kDefaultFlexShrink = 0.0f;
|
||||
static const YGFloat kWebDefaultFlexShrink = 1.0f;
|
||||
|
||||
extern bool YGFloatsEqual(const float a, const float b);
|
||||
extern bool YGFloatsEqual(const YGFloat a, const YGFloat b);
|
||||
extern facebook::yoga::detail::CompactValue YGComputedEdgeValue(
|
||||
const facebook::yoga::detail::Values<
|
||||
facebook::yoga::enums::count<YGEdge>()>& edges,
|
||||
|
492
yoga/Yoga.cpp
492
yoga/Yoga.cpp
File diff suppressed because it is too large
Load Diff
116
yoga/Yoga.h
116
yoga/Yoga.h
@@ -25,8 +25,8 @@
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
typedef struct YGSize {
|
||||
float width;
|
||||
float height;
|
||||
YGFloat width;
|
||||
YGFloat height;
|
||||
} YGSize;
|
||||
|
||||
typedef struct YGConfig* YGConfigRef;
|
||||
@@ -36,11 +36,11 @@ typedef const struct YGNode* YGNodeConstRef;
|
||||
|
||||
typedef YGSize (*YGMeasureFunc)(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode heightMode);
|
||||
typedef float (*YGBaselineFunc)(YGNodeRef node, float width, float height);
|
||||
typedef YGFloat (*YGBaselineFunc)(YGNodeRef node, YGFloat width, YGFloat height);
|
||||
typedef void (*YGDirtiedFunc)(YGNodeRef node);
|
||||
typedef void (*YGPrintFunc)(YGNodeRef node);
|
||||
typedef void (*YGNodeCleanupFunc)(YGNodeRef node);
|
||||
@@ -93,8 +93,8 @@ WIN_EXPORT bool YGNodeIsReferenceBaseline(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeCalculateLayout(
|
||||
YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
YGFloat availableWidth,
|
||||
YGFloat availableHeight,
|
||||
YGDirection ownerDirection);
|
||||
|
||||
// Mark a node as dirty. Only valid for nodes with a custom measure function
|
||||
@@ -113,21 +113,21 @@ WIN_EXPORT void YGNodeMarkDirtyAndPropogateToDescendants(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void YGNodePrint(YGNodeRef node, YGPrintOptions options);
|
||||
|
||||
WIN_EXPORT bool YGFloatIsUndefined(float value);
|
||||
WIN_EXPORT bool YGFloatIsUndefined(YGFloat value);
|
||||
|
||||
WIN_EXPORT bool YGNodeCanUseCachedMeasurement(
|
||||
YGMeasureMode widthMode,
|
||||
float width,
|
||||
YGFloat width,
|
||||
YGMeasureMode heightMode,
|
||||
float height,
|
||||
YGFloat height,
|
||||
YGMeasureMode lastWidthMode,
|
||||
float lastWidth,
|
||||
YGFloat lastWidth,
|
||||
YGMeasureMode lastHeightMode,
|
||||
float lastHeight,
|
||||
float lastComputedWidth,
|
||||
float lastComputedHeight,
|
||||
float marginRow,
|
||||
float marginColumn,
|
||||
YGFloat lastHeight,
|
||||
YGFloat lastComputedWidth,
|
||||
YGFloat lastComputedHeight,
|
||||
YGFloat marginRow,
|
||||
YGFloat marginColumn,
|
||||
YGConfigRef config);
|
||||
|
||||
WIN_EXPORT void YGNodeCopyStyle(YGNodeRef dstNode, YGNodeRef srcNode);
|
||||
@@ -187,75 +187,75 @@ WIN_EXPORT YGOverflow YGNodeStyleGetOverflow(YGNodeConstRef node);
|
||||
WIN_EXPORT void YGNodeStyleSetDisplay(YGNodeRef node, YGDisplay display);
|
||||
WIN_EXPORT YGDisplay YGNodeStyleGetDisplay(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetFlex(YGNodeRef node, float flex);
|
||||
WIN_EXPORT float YGNodeStyleGetFlex(YGNodeConstRef node);
|
||||
WIN_EXPORT void YGNodeStyleSetFlex(YGNodeRef node, YGFloat flex);
|
||||
WIN_EXPORT YGFloat YGNodeStyleGetFlex(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetFlexGrow(YGNodeRef node, float flexGrow);
|
||||
WIN_EXPORT float YGNodeStyleGetFlexGrow(YGNodeConstRef node);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexGrow(YGNodeRef node, YGFloat flexGrow);
|
||||
WIN_EXPORT YGFloat YGNodeStyleGetFlexGrow(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetFlexShrink(YGNodeRef node, float flexShrink);
|
||||
WIN_EXPORT float YGNodeStyleGetFlexShrink(YGNodeConstRef node);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexShrink(YGNodeRef node, YGFloat flexShrink);
|
||||
WIN_EXPORT YGFloat YGNodeStyleGetFlexShrink(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetFlexBasis(YGNodeRef node, float flexBasis);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexBasisPercent(YGNodeRef node, float flexBasis);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexBasis(YGNodeRef node, YGFloat flexBasis);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexBasisPercent(YGNodeRef node, YGFloat flexBasis);
|
||||
WIN_EXPORT void YGNodeStyleSetFlexBasisAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetFlexBasis(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetPosition(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float position);
|
||||
YGFloat position);
|
||||
WIN_EXPORT void YGNodeStyleSetPositionPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float position);
|
||||
YGFloat position);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetMargin(YGNodeRef node, YGEdge edge, float margin);
|
||||
WIN_EXPORT void YGNodeStyleSetMargin(YGNodeRef node, YGEdge edge, YGFloat margin);
|
||||
WIN_EXPORT void YGNodeStyleSetMarginPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float margin);
|
||||
YGFloat margin);
|
||||
WIN_EXPORT void YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetPadding(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float padding);
|
||||
YGFloat padding);
|
||||
WIN_EXPORT void YGNodeStyleSetPaddingPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float padding);
|
||||
YGFloat padding);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetBorder(YGNodeRef node, YGEdge edge, float border);
|
||||
WIN_EXPORT float YGNodeStyleGetBorder(YGNodeConstRef node, YGEdge edge);
|
||||
WIN_EXPORT void YGNodeStyleSetBorder(YGNodeRef node, YGEdge edge, YGFloat border);
|
||||
WIN_EXPORT YGFloat YGNodeStyleGetBorder(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, float width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidthPercent(YGNodeRef node, float width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, YGFloat width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidthPercent(YGNodeRef node, YGFloat width);
|
||||
WIN_EXPORT void YGNodeStyleSetWidthAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetHeight(YGNodeRef node, float height);
|
||||
WIN_EXPORT void YGNodeStyleSetHeightPercent(YGNodeRef node, float height);
|
||||
WIN_EXPORT void YGNodeStyleSetHeight(YGNodeRef node, YGFloat height);
|
||||
WIN_EXPORT void YGNodeStyleSetHeightPercent(YGNodeRef node, YGFloat height);
|
||||
WIN_EXPORT void YGNodeStyleSetHeightAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetHeight(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetMinWidth(YGNodeRef node, float minWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMinWidthPercent(YGNodeRef node, float minWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMinWidth(YGNodeRef node, YGFloat minWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMinWidthPercent(YGNodeRef node, YGFloat minWidth);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetMinWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetMinHeight(YGNodeRef node, float minHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMinHeightPercent(YGNodeRef node, float minHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMinHeight(YGNodeRef node, YGFloat minHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMinHeightPercent(YGNodeRef node, YGFloat minHeight);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetMinHeight(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetMaxWidth(YGNodeRef node, float maxWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxWidthPercent(YGNodeRef node, float maxWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxWidth(YGNodeRef node, YGFloat maxWidth);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxWidthPercent(YGNodeRef node, YGFloat maxWidth);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetMaxWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeStyleSetMaxHeight(YGNodeRef node, float maxHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxHeightPercent(YGNodeRef node, float maxHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxHeight(YGNodeRef node, YGFloat maxHeight);
|
||||
WIN_EXPORT void YGNodeStyleSetMaxHeightPercent(YGNodeRef node, YGFloat maxHeight);
|
||||
WIN_EXPORT YGValue YGNodeStyleGetMaxHeight(YGNodeConstRef node);
|
||||
|
||||
// Yoga specific properties, not compatible with flexbox specification Aspect
|
||||
@@ -273,15 +273,15 @@ WIN_EXPORT YGValue YGNodeStyleGetMaxHeight(YGNodeConstRef node);
|
||||
// - On a node with flex grow/shrink aspect ratio controls the size of the node
|
||||
// in the cross axis if unset
|
||||
// - Aspect ratio takes min/max dimensions into account
|
||||
WIN_EXPORT void YGNodeStyleSetAspectRatio(YGNodeRef node, float aspectRatio);
|
||||
WIN_EXPORT float YGNodeStyleGetAspectRatio(YGNodeConstRef node);
|
||||
WIN_EXPORT void YGNodeStyleSetAspectRatio(YGNodeRef node, YGFloat aspectRatio);
|
||||
WIN_EXPORT YGFloat YGNodeStyleGetAspectRatio(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT float YGNodeLayoutGetLeft(YGNodeRef node);
|
||||
WIN_EXPORT float YGNodeLayoutGetTop(YGNodeRef node);
|
||||
WIN_EXPORT float YGNodeLayoutGetRight(YGNodeRef node);
|
||||
WIN_EXPORT float YGNodeLayoutGetBottom(YGNodeRef node);
|
||||
WIN_EXPORT float YGNodeLayoutGetWidth(YGNodeRef node);
|
||||
WIN_EXPORT float YGNodeLayoutGetHeight(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetLeft(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetTop(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetRight(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetBottom(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetWidth(YGNodeRef node);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetHeight(YGNodeRef node);
|
||||
WIN_EXPORT YGDirection YGNodeLayoutGetDirection(YGNodeRef node);
|
||||
WIN_EXPORT bool YGNodeLayoutGetHadOverflow(YGNodeRef node);
|
||||
bool YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(YGNodeRef node);
|
||||
@@ -290,9 +290,9 @@ bool YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(YGNodeRef node);
|
||||
// set using point values then the returned value will be the same as
|
||||
// YGNodeStyleGetXXX. However if they were set using a percentage value then the
|
||||
// returned value is the computed value used during layout.
|
||||
WIN_EXPORT float YGNodeLayoutGetMargin(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT float YGNodeLayoutGetBorder(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT float YGNodeLayoutGetPadding(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetMargin(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetBorder(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT YGFloat YGNodeLayoutGetPadding(YGNodeRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void YGConfigSetLogger(YGConfigRef config, YGLogger logger);
|
||||
WIN_EXPORT void YGAssert(bool condition, const char* message);
|
||||
@@ -308,7 +308,7 @@ WIN_EXPORT void YGAssertWithConfig(
|
||||
// want to avoid rounding - set PointScaleFactor to 0
|
||||
WIN_EXPORT void YGConfigSetPointScaleFactor(
|
||||
YGConfigRef config,
|
||||
float pixelsInPoint);
|
||||
YGFloat pixelsInPoint);
|
||||
void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
||||
YGConfigRef config,
|
||||
bool shouldDiffLayout);
|
||||
@@ -351,7 +351,7 @@ WIN_EXPORT YGConfigRef YGConfigGetDefault(void);
|
||||
WIN_EXPORT void YGConfigSetContext(YGConfigRef config, void* context);
|
||||
WIN_EXPORT void* YGConfigGetContext(YGConfigRef config);
|
||||
|
||||
WIN_EXPORT float YGRoundValueToPixelGrid(
|
||||
WIN_EXPORT YGFloat YGRoundValueToPixelGrid(
|
||||
double value,
|
||||
double pointScaleFactor,
|
||||
bool forceCeil,
|
||||
@@ -360,6 +360,7 @@ WIN_EXPORT float YGRoundValueToPixelGrid(
|
||||
YG_EXTERN_C_END
|
||||
|
||||
#ifdef __cplusplus
|
||||
YG_EXTERN_CXX_BEGIN
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
@@ -371,4 +372,5 @@ void YGTraversePreOrder(
|
||||
|
||||
void YGNodeSetChildren(YGNodeRef owner, const std::vector<YGNodeRef>& children);
|
||||
|
||||
YG_EXTERN_C_END
|
||||
#endif
|
||||
|
@@ -127,12 +127,12 @@ struct Event::TypedData<Event::LayoutPassEnd> {
|
||||
template <>
|
||||
struct Event::TypedData<Event::MeasureCallbackEnd> {
|
||||
void* layoutContext;
|
||||
float width;
|
||||
YGFloat width;
|
||||
YGMeasureMode widthMeasureMode;
|
||||
float height;
|
||||
YGFloat height;
|
||||
YGMeasureMode heightMeasureMode;
|
||||
float measuredWidth;
|
||||
float measuredHeight;
|
||||
YGFloat measuredWidth;
|
||||
YGFloat measuredHeight;
|
||||
const LayoutPassReason reason;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user