LargeContentViewerElement
public protocol LargeContentViewerElement : Element
Enables an element to opt-in to Large content viewer accessibility support. For a given
element, add conformance to this protocol and provide the largeContentViewerConfiguration
to
automatically provide the large content viewer behavior without having to manually supply the arguments
every time an instance of the element is defined.
Large content viewer allows users to see a larger version of content when they press and hold on small UI elements. This is particularly useful for users who are low vision. It must only be used if dynamic type is not an option for a given element; it must not be used as a substitute for dynamic type. It’s triggered by a long press gesture and shows an enlarged version of the content in a special overlay. It’s only available when accessibility system type sizes.
If your element can function as a large content viewer element, add conformance to this protocol to
add large content viewer behavior via accessibilityShowsLargeContentViewer()
.
-
Returns the large content viewer configuration for this element.
Declaration
Swift
var largeContentViewerConfiguration: LargeContentViewerConfiguration { get }
-
accessibilityShowsLargeContentViewer()
Extension methodEnables large content viewer for the provided element.
Declaration
Swift
public func accessibilityShowsLargeContentViewer() -> Element