This could be implemented in several ways, but I think the simplest and most flexible way would be to create a dedicated component that you could wrap other components with.
for example, the following code could add a 10 pixel margin around the children. The margin component would automatically add constraints to it's children to create the proper margin.
component = Margin.new(10)
component.children = [
# add children
]
This could be implemented in several ways, but I think the simplest and most flexible way would be to create a dedicated component that you could wrap other components with.
for example, the following code could add a 10 pixel margin around the children. The margin component would automatically add constraints to it's children to create the proper margin.