php
iphone
css
c
xml
ajax
database
android
objective-c
multithreading
html5
perl
facebook
tsql
delphi
mvc
api
jsp
postgresql
dom
There is one little code snipet:
+ (void)restoreWindowWithIdentifier:(NSString *)identifier state:(NSCoder *)state completionHandler:(void (^)(NSWindow *, NSError *))completionHandler { // Get the window from the window controller, // which is stored as an outlet by the delegate. // Both the app delegate and window controller are // created when the main nib file is loaded. MyAppDelegate* appDelegate = (MyAppDelegate*)[[NSApplication sharedApplication] delegate]; NSWindow* mainWindow = [appDelegate.windowController window]; // Pass the window to the provided completion handler. completionHandler(mainWindow, nil); }
Found here.
Hopefully this will help you.
Edit:
Be sure you are implementing the protocol in your application class, remember you have to add it in your m file.
@interface MyClass : FatherClass <NSWindowRestoration>
**I'm not 100% of the name of the protocol so that last line could be wrong, sorry I'm in a rush right now, it's either that or NSWindowRestorationDelegate.
NSWindowRestorationDelegate