Skip to content

various utilities for OSX Cocoa. mostly stuff that's in IOS but missing in OSX

Notifications You must be signed in to change notification settings

philfung/osx-dudley

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osx-dudley

Utilities for OSX Cocoa, mainly stuff in IOS that is missing in OSX.

DudNSButton

Unlike UIButton, NSButton has few UI styling methods exposed. DudNSButton is a subclass of NSButton that allows easy UI styling, such as setting background color, border attributes, and text attributes.

Usage:

  let buttonView = DudNSButton.init(frame: NSRect(x: 0, y: 0, width: 300.0, height: 150.0))
  buttonView.setBackgroundColor(color: NSColor.blue)
  buttonView.setBorderAttributes(color: NSColor.black, borderWidth: 2.0, cornerRadius: 5.0)
  buttonView.setText(text: "Submit", font: NSFont.boldSystemFont(ofSize: 16.0), color: NSColor.white)

MIT License

About

various utilities for OSX Cocoa. mostly stuff that's in IOS but missing in OSX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages