Skip to content

Instantly share code, notes, and snippets.

@soxjke
Created October 26, 2017 10:32
Show Gist options
  • Select an option

  • Save soxjke/8e1fb2a999112643385e9fe0d267289d to your computer and use it in GitHub Desktop.

Select an option

Save soxjke/8e1fb2a999112643385e9fe0d267289d to your computer and use it in GitHub Desktop.
import UIKit
import SnapKit
class ViewController: UIViewController {
@IBOutlet private weak var containerView: UIView!
@IBOutlet private weak var segmentedControl: UISegmentedControl!
@IBOutlet private weak var leftBarButtonItem: UIBarButtonItem!
@IBOutlet private weak var rightBarButtonItem: UIBarButtonItem!
private lazy var currentWeatherView: WeatherView = WeatherView.fromNib()
override func viewDidLoad() {
super.viewDidLoad()
containerView.addSubview(currentWeatherView)
currentWeatherView.snp.makeConstraints { (make) in make.edges.equalToSuperview() }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment