Example of an NSView Category:
extension NSView {
func sizeToFillSuperview() {
layout(self) { view in
view.size == view.superview!.size; return
}
}
}
Swift Compiler Error is "extra argument in call"
Early substitution for self doesn't help, nor does anything else I've thought of.
Obviously a global function like this is okay, but not ideal:
func sizeToFillSuperview(view: NSView) {
layout(view) { box in
box.size == box.superview!.size; return
}
}
THANKS!
Example of an NSView Category:
Swift Compiler Error is "extra argument in call"
Early substitution for self doesn't help, nor does anything else I've thought of.
Obviously a global function like this is okay, but not ideal:
THANKS!