I think if figured out what's going on. On launch my app needs to determine whether or not it should show onboarding UI based on a few conditions. While my app is making this determination, I overlay a separate UIWindow in the UIWindowScene that shows a UIActivityIndicatorView. Then if I do in fact have to show the onboarding UI, this overlayed window shows the onboarding view controller by presenting it modally.
Underneath this overlayed window is my standard UIWindow. In that window hierarchy underneath there is a UINavigationController with navigation bar. It appears UIKit on macOS draws this separator line underneath the navigation bar when the window is in certain states...but the separator is bleeding through from the UIWindow that's offscreen. That UIWindow should be completely offscreen while the overlay window is the key window (and it is, except for the line separator bleeding through and causing this glitch).
So if I do this:
#if TARGET_OS_MACCATALYST
[self setNavigationBarHidden:YES animated:NO];
#endif
The line separator issue goes away.
Topic:
App & System Services
SubTopic:
General
Tags: