Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LayoutManager #66

Merged
merged 4 commits into from
Nov 25, 2021
Merged

Add LayoutManager #66

merged 4 commits into from
Nov 25, 2021

Conversation

muukii
Copy link
Collaborator

@muukii muukii commented Nov 24, 2021

Simulator Screen Recording - iPhone 8 - 2021-11-25 at 01 14 46

Comment on lines +14 to +54
let box1 = UIView.mock(backgroundColor: .neon(.cyan))
let box2 = UIView.mock(backgroundColor: .neon(.cyan))
let box3 = UIView.mock(backgroundColor: .neon(.cyan))

manager.setup(on: view) {

if counter % 2 == 0 {

VStackBlock {
box1
.viewBlock
.size(.smallSquare)

box2
.viewBlock
.size(.smallSquare)

box3
.viewBlock
.size(.smallSquare)

StackingSpacer(minLength: 0)
}
} else {

HStackBlock {
box1
.viewBlock
.size(.largeSquare)

box2
.viewBlock
.size(.largeSquare)

box3
.viewBlock
.size(.largeSquare)

StackingSpacer(minLength: 0)
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to use

@muukii muukii marked this pull request as ready for review November 25, 2021 05:37
@muukii muukii merged commit 25bb58c into main Nov 25, 2021
@muukii muukii deleted the muukii/layout-manager branch November 25, 2021 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant