Unfamiliar with technique to solve pre-populating textfields (w/out access to a viewDidLoad or similar method) on Mac Desktop
I have a mainMenu.xib - that sets up all my interface items (button, textfields, etc).
I have a LogController that has access to all these items via IBOutlet and IBAction. Works fine - All connected and running well.
However, I want to have NSUserDefault values pre-populated in the textfields. However, I can't figure out how - since my LogController doesn't extend a UIViewController (Like in the iPhone world) - I don't have access to delegate methods like viewDidLoad - etc - where I could put this type of logic.
I can't put it in here (since this doesn't have access to th开发者_高级运维e UI elements in IB):
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
}
So for desktop applications on mac, how do I got about solving this type of problem?
Your friend is
-(void)awakeFromNib
http://www.cocoadev.com/index.pl?AwakeFromNib
精彩评论