我想为我的自定义键盘添加触觉和声音。
这是我的代码。
let generator = UIImpactFeedbackGenerator(style: .medium) generator.prepare() generator.impactOccurred()
怎么了?