1. 导入AudioToolbox.framework包
  2. 在swift文件中 

    import AudioToolbox

  3. AudioServicesPlaySystemSound(SystemSoundID.convertFromIntegerLiteral(UInt32(kSystemSoundID_Vibrate)))

05-11 02:53