21 lines
440 B
Swift
21 lines
440 B
Swift
//
|
|
// AccessibilityActionElement.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 6/19/24.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
/// Custom UIAccessibilityElement that allows you to set the default action used in accessibilityActivate.
|
|
public class AccessibilityActionElement: UIAccessibilityElement {
|
|
var action: (() -> Void)?
|
|
|
|
public override func accessibilityActivate() -> Bool {
|
|
action?()
|
|
return true
|
|
}
|
|
}
|
|
|