-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
With the NSLayoutAnchor, we can now use it to avoid the layout format language. Imagine, in your function that defines layout, we could pass the view and return an array of objects. Like this:
let title = "title".build(UILabel.self).style([.numberOfLines(0), .text("test")])
let subtitle = "subtitle".build(UILabel.self).style([.numberOfLines(0), .text("subtitle")])
let brick = "details".build().bricks(title) { container, title in
return [
title.centerXAnchor.constraint(equalTo: container.centerXAnchor),
title.centerYAnchor.constraint(equalTo: container.centerYAnchor),
]
}However, this approach will require some refactoring. I can volunteer, if you want :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels