Added initial POC version of NetNewsWire for iOS to use as a starting point for the actual app.

This commit is contained in:
Maurice Parker
2019-04-15 15:03:05 -05:00
parent 8f1f153e98
commit 8526db8b4c
47 changed files with 4454 additions and 220 deletions

View File

@@ -0,0 +1,29 @@
//
// UIStoryboard+.swift
// NetNewsWire
//
// Created by Maurice Parker on 4/8/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import UIKit
extension UIStoryboard {
static var main: UIStoryboard {
return UIStoryboard(name: "Main", bundle: nil)
}
func instantiateController<T>(ofType type: T.Type = T.self) -> T where T: UIViewController {
let storyboardId = String(describing: type)
guard let viewController = instantiateViewController(withIdentifier: storyboardId) as? T else {
print("Unable to load view with Scene Identifier: \(storyboardId)")
fatalError()
}
return viewController
}
}