开发者

Unfamiliar with technique to solve pre-populating textfields (w/out access to a viewDidLoad or similar method) on Mac Desktop

开发者 https://www.devze.com 2022-12-18 01:43 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号