github / Rebel

Cocoa framework for improving AppKit
Other
1.13k stars 124 forks source link

Add convenience methods to load views from nibs #45

Closed jspahrsummers closed 11 years ago

jspahrsummers commented 11 years ago

It's often useful to load a view from a nib without needing or wanting an attached view controller. We could offer a category on NSView that makes this easy.

Note that it's not sufficient to use and discard an NSViewController, since that requires that the view outlet be hooked up in the nib, which may not necessarily be the case (or, at least, shouldn't be a requirement).

GHfM has some code to do this which could be genericized and cleaned up for Rebel.

joshaber commented 11 years ago

And just for future selves, 10.8 has a method that makes this easier without the cray memory management semantics.

jspahrsummers commented 11 years ago

We're moving away from this in GHfM, partly because it's hard to get the semantics right, so I don't think we should do this after all.