[YogaKit] support macOS.

This commit is contained in:
vvveiii
2020-08-13 21:44:57 +08:00
parent 0d339b6754
commit 8608c92816
22 changed files with 1289 additions and 32 deletions

View File

@@ -18,14 +18,10 @@
- (void)viewDidLoad {
[super viewDidLoad];
CGSize containerSize = self.view.bounds.size;
UIView *root = self.view;
root.backgroundColor = UIColor.whiteColor;
[root configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
layout.isEnabled = YES;
layout.width = YGPointValue(containerSize.width);
layout.height = YGPointValue(containerSize.height);
layout.alignItems = YGAlignCenter;
layout.justifyContent = YGJustifyCenter;
}];