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
This UITableViewCellSubclass doesn't work properly, for some reason it just stretches the avatarContainer to cell's edges.
avatarContainer
class BuggedCell: UITableViewCell { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) let guide = contentView.layoutMarginsGuide let avatarContainer = UIView() contentView.addSubview(avatarContainer) avatarContainer.edges(to: guide, excluding: .trailing) avatarContainer.backgroundColor = .red avatarContainer.size(CGSize(width: 100, height: 100), priority: UILayoutPriority(999)) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
But this subclass does everything correctly
class BugFreeCell: UITableViewCell { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) let guide = contentView.layoutMarginsGuide let avatarContainer = UIView() contentView.addSubview(avatarContainer) avatarContainer.leading(to: guide) avatarContainer.top(to: guide) avatarContainer.bottom(to: guide) avatarContainer.backgroundColor = .red avatarContainer.size(CGSize(width: 100, height: 100), priority: UILayoutPriority(999)) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
The subclasses should display identical results, but they don't 😫.
The text was updated successfully, but these errors were encountered:
As far as I can see in code there is not implementation that excludes leading and trailing.
leading
trailing
Check this function implementation:
TinyConstraints/TinyConstraints/Classes/TinyConstraints.swift
Line 46 in f413ea5
Adding support for leading and trailing is trivial, but I am not sure if these two should be considered as edges.
Any thoughts on this @roberthein?
Sorry, something went wrong.
No branches or pull requests
This UITableViewCellSubclass doesn't work properly, for some reason it just stretches the
avatarContainer
to cell's edges.But this subclass does everything correctly
The subclasses should display identical results, but they don't 😫.
The text was updated successfully, but these errors were encountered: