Re: Unhidden subview outside of superview's bounds

2024-02-10 Thread Dragan Milić via Cocoa-dev
> On Sat 10.02.2024, at 11.16, Dragan Milić via Cocoa-dev wrote:
> 
> Hello all,
> 
> I’ve finally changed my main development platform to macOS 14 Sonoma and 
> almost immediately have I encountered something I consider being a bug. I 
> searched for similar issues, but nowhere have I found any relevant 
> information or help.

As someone has notified me (without posting here as well), this is the 
consequence the default value of property “clipsToBounds” of NSView being 
changed from  YES to NO in Sonoma SDK. Thanks Pierre again!

-- Dragan
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Unhidden subview outside of superview's bounds

2024-02-10 Thread Dragan Milić via Cocoa-dev
Hello all,

I’ve finally changed my main development platform to macOS 14 Sonoma and almost 
immediately have I encountered something I consider being a bug. I searched for 
similar issues, but nowhere have I found any relevant information or help.

The issue is rather funny; if you have a subview and, for whatever reason, it 
finds itself outside of its superview’s bounds, it remains visible, instead of 
being hidden. It’s like you have a window on your room wall, but still the 
interior of your room is visible outside of window’s borders :-)

Here’s a simple Xcode project that explains what I’m talking about:

https://zigz.ag/temp/SubviewBug/UnhiddenXcodeProject.zip

Unpack and build this project, run the test application and see it yourself.

However, there are some differences, regarding the Xcode/SDK version used to 
build the application and the macOS version it runs on. The project format is 
“Xcode 13.0” and " MACOSX_DEPLOYMENT_TARGET = 13.0”. Here you can find 
application bundle, build with Xcode 14:

https://zigz.ag/temp/SubviewBug/UnhiddenXcode14Build.zip

The relevant build parameters, as found in application's Info.plist are:

BuildMachineOSBuild: 22G605
DTPlatformVersion: 13.3
DTSDKBuild: 22E245
DTXcode: 1431
DTXcodeBuild: 14E300c

If you run it on both Ventura and Sonoma, you’ll see ti behaves as expected. 
However, here you can find application bundle, build with Xcode 15:

https://zigz.ag/temp/SubviewBug/UnhiddenXcode15Build.zip

The relevant build parameters, as found in application's Info.plist are:

BuildMachineOSBuild: 23D56
DTPlatformVersion: 14.2
DTSDKBuild: 23C53
DTXcode: 1520
DTXcodeBuild: 15C500b

Now, if you run this build on Ventura, you’ll see it behaves fine. Running it 
on Sonoma however, shows the behaviour I’m trying to explain; the ratio button 
titled “Two” remains visible, even though its superview shrinks and it goes out 
of its superview’s bounds. So, the issue is present only on Sonoma, if build 
with Xcode 15.

The difference is visible even inside Interface Builder. Here is a short video 
of shrinking a superview in IB of Xcode 14, note how the “Two” radio button 
becomes invisible, as it goes outside of its superview’s bounds:

https://zigz.ag/temp/SubviewBug/InterfaceBuilderXcode14.mov

Here is the video of shrinking the same superview in IB of Xcode 15, the “Two” 
radio button remains visible regardless of its superview’s bounds:

https://zigz.ag/temp/SubviewBug/InterfaceBuilderXcode15.mov

Is this a bug? Or did I miss something in macOS 14 Sonoma SDK release notes, 
which would indicate from now on this is expected behaviour (highly unlikely)?

-- Dragan

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com