I have built a proof of concept that creates a CAShapeLayer object and I am able to set it's AccessibilityLabel correctly. However, I am unable to set an AccessibilityIdentifier (it seems this property exists for UIView objects, but not for CALayer objects?).
Does anyone know how to access it for CALayer objects - or if it is even possible?
Alladinian's suggestion above worked perfectly:
"I haven't tried it in practice, but you could adopt UIAccessibilityIdentification protocol and implement accessibilityIdentifier if you have subclassed the CALayer or even adopt the protocol in an extension of CALayer and return its name for example."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With