Skip to content

bluedome/FontSelectionView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FontSelectionView

swift platform mit

View is for selecting fonts instead of NSFontPanel

demo

How to Use

Just copy FontSelctionView.swift and FontSelectionView.xib into your project.

example:

    let fontView = FontSelectionView.instantiate()

    override func viewDidLoad() {
        super.viewDidLoad()

        view.addSubview(fontView)

        // select fonts
        fontView.select(fonts: [NSFont(name: "SF Pro", size: NSFont.systemFontSize)!])

        // set callback
        fontView.onSelectHandler = { fonts in
            print("newFonts=\(fonts)")
        }
    }

License

MIT

About

View is for selecting fonts instead of NSFontPanel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages