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
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
window = UIWindow(frame: UIScreen.main.bounds) | |
window?.backgroundColor = UIColor.white | |
window?.makeKeyAndVisible() |
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
import UIKit | |
/// Extension used to facilitate adding child viewControllers in a viewController | |
public extension UIViewController { | |
/// Embeds a view controller and also adds it's view in the view hierarchay | |
/// | |
/// - Parameter viewController: ViewController to add | |
func add(asChildViewController viewController: UIViewController, anchored: Bool = true, subview: UIView? = nil) { | |
let someView: UIView = subview ?? view |
OlderNewer