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
No description provided.
The text was updated successfully, but these errors were encountered:
here is the code that you have to add so you can have a limit of items displayed and the content scrollable
add this property: public var maxVisibleItems: Int = 5 { didSet { self.setNeedsUpdateConstraints() } }
edit tableHeight and updateConstraints:
fileprivate var tableHeight: CGFloat { let visibleItemsCount = min(dataSource.count, maxVisibleItems) return tableView.rowHeight * CGFloat(visibleItemsCount) }
public override func updateConstraints() { if !didSetupConstraints { setupConstraints() }
didSetupConstraints = true let layout = computeLayout() if !layout.canBeDisplayed { super.updateConstraints() hide() return } xConstraint.constant = layout.x yConstraint.constant = layout.y widthConstraint.constant = layout.width heightConstraint.constant = layout.visibleHeight tableView.isScrollEnabled = layout.offscreenHeight > 0 || dataSource.count > maxVisibleItems DispatchQueue.main.async { [weak self] in self?.tableView.flashScrollIndicators() } super.updateConstraints()
}
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: