I find NSImageView with icns file does not display color correctly on Sonoma.
As the test app shows, on the retina display, if the image view size is 18 or less, the problem happens. On non-retina display, the threshold is 42.
The correct colors should be red, yellow, and blue.
_imageView1.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"];
_imageView2.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Actions.icns"];
_imageView3.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns"];
And if put the icns file into xcode project, then change code to
_imageView3.image = [NSImage imageNamed:@"BookmarkIcon"];
The problem still exists.
Wrong (image view size is small)
Correct (image view size is big enough)
Post
Replies
Boosts
Views
Activity
SCFilter in ScreenCaptureKit has 5 methods to select the capture target.
Only one method initWithDesktopIndependentWindow: accepts one SCWindow as its capture target.
The other four methods target one SCDisplay and extra SCRunningApplication or SCWindow combinations to filter out items by their criteria.
Compared to the old API to capture windows or displays snapshots:
CGImageRef CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption listOption, CGWindowID windowID, CGWindowImageOption imageOption);
CGImageRef CGWindowListCreateImageFromArray(CGRect screenBounds, CFArrayRef windowArray, CGWindowImageOption imageOption);
The second method accepts an array of CGWindowID, so the result is a composite image formed from these windows.
Will Apple provide a substitute in SCFilter for this method in the future?
I find a glitch of CGContextSetFillPattern glitch only on Ventura.
If the size of the pattern is a multiple of 4, there will be a hole in the upper right corner of the pattern in the first column.
I make a demo Xcode project here.
I have tried all three CGPatternTiling enum values, all have the same result.
The motion detection is a seldom used feature in most Apps, I only know it is used to undo input like Message.
But it is misused very some "smart" designer/manager, for example, Weibo, a massive social network app. On its launching screen, if user shakes his device, most of time by accident, the app jump to another shopping app's goods page. This is annoying.
We know Apple values user privacy very much. So user's input, like camera and microphone require permission to use. Accelerometer is also an input, it should be protected too.
Thanks.