You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在iOS17 Dynamic Island中实现按钮点击触觉反馈?

iOS17 Dynamic Island按钮触觉反馈解决方案

在iOS17中,Dynamic Island已支持与Button、Toggle组件交互,但常规的触觉反馈方案(如使用UIImpactFeedbackGenerator)在该场景下无法生效:

UIImpactFeedbackGenerator.init(style: .light).impactOccurred()

经过测试,使用系统原生的古老触觉生成方法可正常触发短触觉反馈,代码如下:

AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))

内容的提问来源于stack exchange,提问作者闪电狮

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 22:02:32