I am building an application, where I need to put two seperate NSViews side-by-side when in fullscreen mode. As I have seen, probably there are two ways to do this, either I can make a super NSView and two subviews, or put two NSViews in a NSWindow. The problem is that though the process works for me for one NSView, I can’t put them together at the same time. The method setContentView: allows me to set only one view for a window. And the method setSubViews: covers up the whole of the NSView. How can one specify the exact coordinated of the views to place and size them?
I am building an application, where I need to put two seperate NSViews side-by-side
Share
An NSWindow only has one root NSView… and that’s the Window’s
contentView. Store any other views in that root view.Using the Interface Builder offers an easy way of configuring the location/size of views in a graphical way.. but you can manually configure their frames with something around the lines of :
Some reading : NSView