osx - Inheritance from Both NSViewController and NSImageView (Swift) -


how should approach situation of having inherit both nsviewcontroller , nsimageview in same project? thank's!

neither swift nor objective-c support multiple inheritance in way seem require.

the usual adage composition on inheritance meaning rather have class inherit every class needs interact with, compose class objects able handle interaction.

so rather inherit nsviewcontroller , nsimageview can have view controller subclass have property object nsimageview subclass.


Comments