Search code examples
user-interfacexamarinxcode15macos-sonoma

Logo Resizes Only in macOS Sonoma which Pushes Other Controls Out of Window and Not Rendered


This is a Xamarin project with XIB UI files. When rendered on the macOS Sonoma, some of the controls aren't rendering after the bottom of the window even when stretching the window.

I've read about the clipsToBounds default value issue. We don't override the dirtyRect method, but I tried it anyway. I can see changes based on the values of Default, No, and Yes on everything in the window and the window itself. When Default or No, I can see the top of the text of the next label. When Yes, I cannot. So, it doesn't fix the issue despite having an effect.

Whatever is causing the controls to not render may not be something I care to solve. What might solve it is simply stopping the ImageView from growing vertically in size. Only when running in Sonoma AND in the main storyboard in the XCode Interface Builder after letting XCode 15 upgrade the view's XIB file the ImageView's height goes from 199 to 290 pushing the other controls down. The Interface Builder doesn't let me change the height through the UI, and it will eventually change it back if I change the height in the source code view of the storyboard file.

One last point of background information is that the XIB files need upgrading even in XCode 13. Code rot is a concern.

I'm not sure what code and before or after upgrade people will want to see, so I'm waiting to post code until someone says what would be helpful. The relevant files seem to be LoginView.xib (window in question) and main.storyboard. However, it could also be the controller, view, or model code behind it. Thanks in advance.


Solution

  • Coworker figured it out. There were places where certain controls had horizontal constraints but no vertical constraints. That has not been a problem until Sonoma. He added the vertical constraints appropriately, and the ImageView works as expected now in Sonoma, Monterrey, and Ventura.