We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm testing out this library and based on documentation I can't seem to display table's header (an empty one).
Release: 0.3 Package Manager: Carthage
Here's my view controller:
class ViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() let box = Box<Int, Int>.empty |-+ Section<Int, Int>(id: 0, header: EmptySpaceComponent(height: 24, color: .green), footer: EmptySpaceComponent(height: 50, color: .red)) |---+ 5 <> RowComponent(i: 5) tableView.render(box) } }
The EmptySpaceComponent:
EmptySpaceComponent
struct EmptySpaceComponent: Renderable { var height: CGFloat var color: UIColor typealias View = UIView func render(in view: UIView) { view.heightAnchor.constraint(equalToConstant: height).isActive = true view.backgroundColor = color view.layoutIfNeeded() } }
And the RowComponent:
RowComponent
struct RowComponent: Renderable { var i: Int typealias View = UILabel func render(in view: UILabel) { view.text = "\(i)" view.heightAnchor.constraint(equalToConstant: 50).isActive = true } }
The text was updated successfully, but these errors were encountered:
We haven't been making regular releases after 0.3 (until recently) which would otherwise carry the fix. My apologies.
Sorry, something went wrong.
No branches or pull requests
I'm testing out this library and based on documentation I can't seem to display table's header (an empty one).
Release: 0.3
Package Manager: Carthage
Here's my view controller:
The
EmptySpaceComponent
:And the
RowComponent
:The text was updated successfully, but these errors were encountered: