Access controls in NSView

Discussion in 'Mac Programming' started by satyam90, Nov 29, 2007.

  1. satyam90 macrumors regular


    Jul 30, 2007
    Bangalore, India
    Hi, I am using Cocoa with Obj-C on XCode 2.4.1
    I have a 4 views (with different controls in each of the view) added to NIB and accessing it through Controller. I am able to show different views whenever toolbar buttons are clicked.
    I want to set the controls with some default values at the time of showing the view. For setting these controls in views, apart from awakeFromNib & windowDidLoad what are the other methods where I can set the controls. Will there be anything like constructor for view? How to set?

  2. kainjow Moderator emeritus


    Jun 15, 2000
    NSViews are initialized via the initWithFrame: method. They get called awakeFromNib if they are loaded from a nib, but you can't always rely on that, so use initWithFrame.

Share This Page