Last active
January 18, 2016 17:17
-
-
Save ksmandersen/4fc0f85a9a82e551cd17 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import UIKit | |
class GenericView: UIView { | |
let stackView = UIStackView() | |
init() { | |
super.init(frame: CGRectZero) | |
setup() | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
func setup() { | |
addSubview(stackView) | |
stackView.setEdgesEqualToSuperview() | |
stackView.axis = .Horizontal | |
stackView.spacing = 0 | |
translatesAutoresizingMaskIntoConstraints = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment