In my application, the user can press a key to switch between large and small window sizes. With a small size, the window is just enough to contain a certain look. With large sizes, the view becomes larger, while maintaining its aspect ratio, so that the view ends as high as the window, but not as wide. With a large size, the view should be centered in the window.
Now I am doing this in 2 stages: (1) resize the window, (2) resize and move the view. However, the user can see that these two steps occur one after the other, and not simultaneously. Is there a way to make NSWindow and NSView change or move at the same time? Or in some other way to solve this problem?
source share