source: launchers/macosx/I2PLauncher/userinterface/PopoverViewController.swift @ e3ab9f8e

Last change on this file since e3ab9f8e was e3ab9f8e, checked in by meeh <meeh@…>, 20 months ago

OSX Launcher: Swift GUI code updates, most related to the new launch method.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1//
2//  PopoverViewController.swift
3//  I2PLauncher
4//
5//  Created by Mikal Villa on 18/09/2018.
6//  Copyright © 2018 The I2P Project. All rights reserved.
7//
8
9import Cocoa
10
11class PopoverViewController: NSViewController {
12 
13  @IBOutlet var routerStatusViewOutlet: RouterStatusView?
14 
15  func getRouterStatusView() -> RouterStatusView? {
16    return self.routerStatusViewOutlet
17  }
18 
19  required init?(coder: NSCoder) {
20    super.init(coder: coder)
21  }
22 
23 
24  override func viewDidLoad() {
25    super.viewDidLoad()
26    // Do view setup here.
27  }
28}
29
30
31extension PopoverViewController {
32  static func freshController() -> PopoverViewController {
33    let storyboard = NSStoryboard(name: "Storyboard", bundle: Bundle.main)
34    //2.
35    let identifier = NSStoryboard.SceneIdentifier(stringLiteral: "PopoverView")
36    //3.
37    guard let viewcontroller = storyboard.instantiateController(withIdentifier: identifier as String) as? PopoverViewController else {
38      fatalError("Why cant i find PopoverViewController? - Check PopoverViewController.storyboard")
39    }
40    //let viewcontroller = PopoverViewController()
41    return viewcontroller
42  }
43}
44
Note: See TracBrowser for help on using the repository browser.