SKCropNode
works by removing every thing from its affected nodes that are not covered by its source image. This is one type of masking, the other is to invert this logic, and reveal everything that's not covered by the source image.
SKCropNode
has a boolean switch to set this state, called invertMask
, sensibly enough.
What's annoying is that it's seemingly private.
If putting aside all the app store approval processes, dangers of private APIs, etc, and accepting that it's something interesting to test... and this is only for the purposes of testing...
How do I set this invertMask
to true, with Swift?
UPDATE:
There are other answers to tangentially similar questions:
How to access iOS private APIs in Swift?
However that doesn't help me, nor is it a direct answer to how to do it for setting a boolean, this particular one, in this particular question, in Swift.
I've asked a question about Selectors here, and accepted an answer that showed me I didn't need to use or understand Selectors in order to achieve that goal: What is a selector in SKAction: perform(_:onTarget:)
But it looks like understanding the exact syntax required to use a Selector might be required to set this boolean in Swift. I don't know what that is, or how to do it, either.
But any other means of setting this boolean (in Swift) is certainly fine.