Skip to content

A collection of extensions to simplify initialization from Nib and Storyboard for macOS and iOS.

License

Notifications You must be signed in to change notification settings

usagimaru/NibInstantiater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NibInstantiater

A collection of extensions useful for initialization from Nib and Storyboard.

  • NibInstantiatable.swift
  • StoryboardInstantiatable.swift

Usage

// Class definition.
class MyCustomView: NSView, NibInstantiatable {
	//...
}

// File’s Owner: nil on the nib file.
let unownedCustomView = MyCustomView.loadUnownedNib()

// File’s Owner: `MyCustomView` on the nib file.
let ownedCustomView = MyCustomView(frame: .zero)
ownedCustomView.loadOwnedNib()

License

See LICENSE for details.

About

A collection of extensions to simplify initialization from Nib and Storyboard for macOS and iOS.

Topics

Resources

License

Stars

Watchers

Forks

Languages