I've been really struggling with this one.
I have an application which has a custom view. When the application starts, I set the custom view's frame size to the application window's frame size. This works. In the AppDelegate.m, I am loading another view controller's view into the custom view. In the view of the view controller, I have an image which is placed at the center of the screen programatically. I have a windowDidResize method in my AppDelegate.m which gets called when I resize the application's window.
The problem is when I resize the application's window, the image does not get repositioned in the center of the main window. I tried using NSWindowDelegate on both the loaded view and the view controller with coding a windowDidResize: method, but this also does not work.
Please help! Thanks.
autoresizingMask. Programmatically,windowDidResizeis probably the wrong place since it is intended for clean up operations, especially with live resizing. For custom view resizing, look atresizeWithOldSuperviewSize. - Jerry