Created
June 4, 2019 18:27
-
-
Save FabiolaRamirez/9e7f0d87198270dce16742932df128cd 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
| topView.backgroundColor = UIColor.creditSesameLightGrayBackgroundColor | |
| topView.addTopSeparator() | |
| bottomView.backgroundColor = UIColor.creditSesameLightGrayBackgroundColor | |
| bottomView.addBottomSeparator() | |
| segmentControl.delegate = self | |
| segmentControl.datasource = self | |
| topView.heightAnchor.constraint(equalToConstant: 16).isActive = true | |
| segmentControl.heightAnchor.constraint(equalToConstant: 32).isActive = true | |
| bottomView.heightAnchor.constraint(equalToConstant: 16).isActive = true | |
| stackView.axis = .vertical | |
| stackView.distribution = .equalSpacing | |
| stackView.alignment = .center | |
| stackView.spacing = 64; | |
| stackView.addArrangedSubview(topView) | |
| stackView.addArrangedSubview(segmentControl) | |
| stackView.addArrangedSubview(bottomView) | |
| stackView.translatesAutoresizingMaskIntoConstraints = false; | |
| //stackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true | |
| //stackView.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment