You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 17, 2021. It is now read-only.
I have some experience using LayoutKit, but I am struggling with a really simple use case. I am not sure if I I am missing something or if it is an issue within the library.
What I want to achieve.
I have a view(P) with fixed size and I want to place two subviews inside. The first(S1) one is with fixed size, the second one(S2) has a fixed width and should fill the remaining height. I also want to have some spacing between the two subviews.
Here is an image of what I try to achieve:
The blue view is the parent view with fixed size. The red view is the subview with fixed size. The black vertical line is what I want to fill the available space.
What I tried
I tried implementing what I described earlier using StackLayout. However the last item (S2) in that layout has his height calculated wrongly. It's height ignores the item spacing defined by the StackLayout. Below is a sample code I tried.
leticonLayout=SizeLayout<UIView>(width:22, height:22, config:{ view in
view.backgroundColor =.red
})letverticalLineLayout=SizeLayout<UIView>(width:3, config:{ view in
view.backgroundColor =UIColor.black
})letstackLayout=StackLayout(axis:.vertical, spacing:10, sublayouts:[iconLayout, verticalLineLayout])letsizeLayout=SizeLayout(size:CGSize(width:self.view.frame.width, height:100), sublayout: stackLayout, config:{ view in
view.backgroundColor =.blue
})
Here is an image of what I get as result.
Am I missing something or is this an issue with LayoutKit?
Thank you!