Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
extension OptionsViewController {
class func create(completionBlock: @escaping OptionsCompletionHandler) -> UIViewController? {
let storyboard = UIStoryboard(name: "Options", bundle: nil)
guard let vc =
storyboard.instantiateViewController(withIdentifier:"OptionsViewController") as? OptionsViewController else {
return nil
}
vc.completionBlock = completionBlock
return vc
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment