YGOverflowScroll is not working with UIScrollView #940
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[self.view configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
layout.isEnabled = YES;
layout.flexDirection = YGFlexDirectionColumn;
}];
UIScrollView *scrollview = [[UIScrollView alloc] init];
[self.view addSubview:scrollview];
[scrollview configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
layout.isEnabled = YES;
layout.width = YGPercentValue(100);
layout.height = YGPercentValue(100);
layout.flexDirection = YGFlexDirectionColumn;
layout.overflow = YGOverflowScroll;
}];
UIView *view1 = [[UIView alloc] init];
[view1 setBackgroundColor:[UIColor redColor]];
[scrollview addSubview:view1];
[view1 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) {
layout.isEnabled = YES;
layout.width = YGPercentValue(100);
layout.height = YGPercentValue(50);
}];
[self.view.yoga applyLayoutPreservingOrigin:NO];
After call ApplyLayout, scrollview contentSize not correct
Any Update ? I found that YGValueAuto is work out but YGPercentValue(100) does not .
We are deprecating YogaKit as part of the Yoga 2.0 release. We are still going to release a new revision based on the current state of the repo, but won't be accepting new contributions, since we are going to be removing it from the repo after.