Last active
December 21, 2019 08:43
-
-
Save sTinGe/be0c393aeec9c61cea82f7ce1afe2cf9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// avoid ambiguous position by using wrapper | |
let wrapper = UIView() | |
let view = HeaderView() | |
view.translatesAutoresizingMaskIntoConstraints = false | |
wrapper.addSubview(view) | |
NSLayoutConstraint.activate([ | |
view.leftAnchor.constraint(equalTo: wrapper.leftAnchor), | |
view.rightAnchor.constraint(equalTo: wrapper.rightAnchor), | |
view.topAnchor.constraint(equalTo: wrapper.topAnchor), | |
view.bottomAnchor.constraint(equalTo: wrapper.bottomAnchor), | |
]) | |
tableView.tableFooterView = wrapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment