实例方法
accessibility
accessibilityAdjustableAction(_:)
向视图添加可访问性可调整的操作。动作允许辅助技术(例如 VoiceOver)通过调用动作与视图交互。
声明
func accessibilityAdjustableAction(_ handler: @escaping (AccessibilityAdjustmentDirection) -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>
详述
例如,这就是如何将用于浏览页面的可调整操作添加到视图中的方式。
var body: some View {
PageControl()
.accessibilityAdjustableAction { direction in
switch direction {
case .increment:
// Go to next page
case .decrement:
// Go to previous page
}
}
}
可用版本
iOS 13.0+, iPadOS 13.0+, macOS 10.15+, Mac Catalyst 13.0+, tvOS 13.0+, watchOS 6.0+
相关用法
- Swift Never accessibilityAction(action:label:)用法及代码示例
- Swift Never accessibilityAction(_:_:)用法及代码示例
- Swift Never accessibilityAction(named:_:)用法及代码示例
- Swift Never accessibilityChildren(children:)用法及代码示例
- Swift Never accessibilityRepresentation(representation:)用法及代码示例
- Swift Never accessibilityRotor(_:entries:entryID:entryLabel:)用法及代码示例
- Swift Never accessibilityChartDescriptor(_:)用法及代码示例
- Swift Never accessibilityShowsLargeContentViewer()用法及代码示例
- Swift Never accessibilityRotor(_:entries:)用法及代码示例
- Swift Never accessibilityRotor(_:textRanges:)用法及代码示例
- Swift Never accessibilityRotor(_:entries:entryLabel:)用法及代码示例
- Swift Never accessibilityScrollAction(_:)用法及代码示例
- Swift Never accessibilityShowsLargeContentViewer(_:)用法及代码示例
- Swift Never alert(isPresented:error:actions:message:)用法及代码示例
- Swift Never autocorrectionDisabled(_:)用法及代码示例
- Swift Never alert(_:isPresented:presenting:actions:)用法及代码示例
- Swift Never alignmentGuide(_:computeValue:)用法及代码示例
- Swift Never allowsTightening(_:)用法及代码示例
- Swift Never alert(isPresented:error:actions:)用法及代码示例
- Swift Never alert(_:isPresented:actions:)用法及代码示例
- Swift Never alert(_:isPresented:presenting:actions:message:)用法及代码示例
- Swift Never aspectRatio(_:contentMode:)用法及代码示例
- Swift Never alert(_:isPresented:actions:message:)用法及代码示例
- Swift Never pageCommand(value:in:step:)用法及代码示例
- Swift Never opacity(_:)用法及代码示例
注:本文由纯净天空筛选整理自apple.com大神的英文原创作品 Never accessibilityAdjustableAction(_:)。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。