Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

PrefsWindowController

Preferences Window Controller For macOS

How to Use

It's really easy, just setup the prefs window controller, and then add VC that confirm to PrefsWindowControllerProtocol to it.

  1. VC Setup

    Just implementate 3 required methods:

class VC1: NSViewController, PrefsWindowControllerProtocol {
    
    func preferencesIdentifier() -> String {
        return "VC1"
    }
    
    func preferencesTitle() -> String {
        return "VC1"
    }
    
    func preferencesIcon() -> NSImage {
        return NSImage(named: NSImageNameAdvanced)!
    }

}
  1. Prefs Setup
let prefs = PrefsWindowController()  
prefs.viewControllers = [VC1(),VC2()]  
  1. Show Prefs
prefs.showPreferencesWindow()
  1. Hide Prefs
prefs.dismissPreferencesWindow()

About

Preferences Window Controller For macOS

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages