I have two nib files: the main application window, and a small view that I want to use in it. How can I insert instance of this view into the main window using interface builder?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t. If you want a small view in your main application window, just drag a custom view object onto your window in the main nib.
You can add your second nib view to your main window, but that has to be done in code. The usual way to do that is to add a new file to your project that’s a subclass of NSViewController — you will get a new xib file with this that has a view. Then you would alloc initWithNibName:bundle: to create an instance of your view controller, and add its view to your main window’s contentView.