Skip to content

Instantly share code, notes, and snippets.

@shanev
Created May 1, 2017 23:18
Show Gist options
  • Save shanev/4bc155c076d8a90abaff8d4c78a1637e to your computer and use it in GitHub Desktop.
Save shanev/4bc155c076d8a90abaff8d4c78a1637e to your computer and use it in GitHub Desktop.
import UIKit
public class ViewController<T>: UIViewController {
var viewModel: T!
override public func viewDidLoad() {
super.viewDidLoad()
assertViewModel()
}
}
private extension ViewController {
func assertViewModel() {
assert(viewModel != nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment