Hi all,
I am creating a sample application for Mac OSX. I created a window which contains a login button and I added a new custom view. Now I need to load the custom view to the window when the user clicks the login button. Please anyone help me...
Hi all,
I am creating a sample application for Mac OSX. I created a window which contains a login button and I added a new custom view. Now I need to load the custom view to the window when the user clicks the login button. Please anyone help me...
Will this help?:
[[window contentView] addSubview:customView];
[window setContentView:customView]
will also do the job.
You also need to add IBOutlet variables for your window and custom view to the header file for your controller, and drag that onto the Interface Builder document window. Then control drag from the controller to the window and view, and select the variables.
(and you need to change the controller to be an instance of your custom controller class, which you do by selecting it in Interface Builder and going to the Inspector)