One thing you should know is that checking the "Restorable" option in IB changes the window property. The actual restoration and conservation is in your hands.
First, you must comply with the NSWindowDelegate protocol and implement -window:willEncodeRestorableState:state and -window:didDecodeRestorableState: methods that encode and decode your window properties (for example, your window frame, which you obviously get by calling [myWindow frame] ).
You also need to comply with the NSWindowRestoration protocol and implement +restoreWindowWithIdentifier:state:completionHandler: (make sure you set the class to the recovery class using the setRestorationClass method)
For more detailed information, you can visit this Apple Documentation here .
source share