Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当您快速按住这样的应用程序图标时,如何重新创建确切的振动?
当您在 Facebook Messenger 上滑动消息进行回复时,也会感受到同样的震动。
您可以UIFeedbackGenerator为此使用 a,例如:
UIFeedbackGenerator
UINotificationFeedbackGenerator().notificationOccurred(.success)
或者
UISelectionFeedbackGenerator().selectionChanged()