Calling applyLayout(preservingOrigin: true) multiplies margin #1023
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?
Report
Issues and Steps to Reproduce
Use YogaKit as a Pod for iOS Project
Expected Behavior
Layout stays the same.
contentView
always has amarginTop=40
andmarginLeft=10
.Actual Behavior
Each time

yoga.applyLayout(preservingOrigin: true)
is called margins are accumulated.No, it looks that I still don't understand how it works...
YGLayout.m
You should'nt set margin in
Root
view.I fixed in my PR: https://github.com/facebook/yoga/pull/1026
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.