![](/img/trans.png)
[英]Why is the vibration duration in iOS not configurable (React Native)?
[英]How to create vibration with customized duration on ios's objectiveC?
我正在使用 UIImpactFeedbackGenerator 和 UINotificationFeedbackGenerator 進行振動,但我無法控制持續時間,有沒有辦法做到這一點?
這個有可能。 您需要使用 CHHapticEngine 和 CHHapticPattern,您可以使用它們來進行自定義觸覺反饋。 我以前從未使用過它,所以我不能確切地說如何針對您的特定場景執行此操作,但我知道您應該這樣做。 這是文檔: https://developer.apple.com/documentation/corehaptics/chhapticengine?language=objc
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.