Post

Replies

Boosts

Views

Created

P3 Display to XYZ Color Space Conversion
When I use the ColorSync Utility to convert Display P3 color (1, 0, 0) to an XYZ color, the result is (0.5151, 0.2412, -0.0011). I expected that result because that is identical to the red colorant tristimulus value in the Display P3.icc file.When I use the CGColor converted method to do the same, the XYZ color is approximately (0.5151, 0.2412, 0.0). Note that the third element is 0.0 whereas it is -0.0011 when using the ColorSync Utility. I have printed out the Z component to 16 digits of precision, and Z is all 0s. It appears that the CGColor converted method is clamping the result from 0 to 1.My questions are:1. Which conversion is correct? The ColorSync utility or the CGColor converted method?2. I am not a color specialist, but I thought that the XYZ components should never be negative. If so, is the colorant tristimulus value in the Display P3.icc file wrong?3. Because CGColor clamped the Z component to 0, the XYZ color cannot be converted back exactly or closely to the Display P3 color (1, 0, 0). I would have expected to be able to go back and forth between the two color spaces when starting from a valid P3 Display color especially since the XYZ color space completely encompasses the P3 Display color space. Is that not true?4. Is (1, 0, 0) an invalid Display P3 color? If so, I can understand the peculiar results. I'm not sure how I would know if a Display P3 color is valid or not. (I only know that the component values must be from 0 to 1.) I think it is valid because Apple uses that color in the UIColor API Reference in an example.
3
0
3.4k
Oct ’16
UIMenuBuilder add menus next to "Open Recent"
Hi, I would like to add commands directly next to "Open Recent" UIMenuOpenRecent such that they are in the same inline menu and not separated by separators (so for instance, an "Open" and "New" directly next to "Open Recent" in the same menu group like many apps.) I have tried inserting a sibling menu with insertSiblingMenu, which seems to work for getting the menus in the same menu group, but this seems to ignore the UIMenuOptionsDisplayInline and those menus are displayed as submenus. I have also tried using replaceChildrenOfMenuForIdentifier which I've seen used to extend existing inline system menus, but the current children for UIMenuOpenRecent always is nil and this also does not appear to work. Does anyone have any advice on how to achieve this? Thanks so much!
0
0
581
Nov ’21
ITMS-90338: Non-public API usage for UIPrintInfo, UIPrintInteractionController in Mac Catalyst app
We have several Mac Catalyst apps that use UIPrintInfo and UIPrintInteractionController to support printing. Both of these classes are marked as available on Mac Catalyst 13.1 in the documentation and we do not receive any errors or warnings using them in our app. We have successfully uploaded to App Store Connect recently with apps that use those classes, but now are receiving error messages from App Store Connect complaining that the use of these classes is non-public API and receive the ITMS-90338 error, even though no code has changed. Is this an issue on the validation side, or are these classes no longer supported on Mac Catalyst? Thanks in advance for any help!
23
7
5.2k
Jun ’22
Share submenu in Mac Catalyst and UICommandTagShare
With Mac Catalyst, in Big Sur and Monterey, you could use UICommandTagShare as the property list for a UICommand in combination with activityItemsConfiguration and itemProvidersForActivityItemsConfiguration to allow a "Share" submenu to appear in a menu in your app (for instance, under the File menu like many other apps). Starting in Ventura, this submenu no longer appears with that same code, and instead the UICommandTagShare command in the menu now just displays "Share" with no submenu, which triggers a UIActivityViewController to appear in the main window. Is there any way to still allow a Share submenu to work in Ventura and beyond with Mac Catalyst? Thanks so much for any help!
1
1
741
Dec ’23