Get System Volume iOS

后端 未结 8 2267
死守一世寂寞
死守一世寂寞 2020-11-27 05:02

My case is simple: I need to play a warning signal and want to make sure the user will hear it, so I want to check the system volume.

How can I find out what the cur

8条回答
  •  萌比男神i
    2020-11-27 05:42

    For Swift 2:

    let volume = AVAudioSession.sharedInstance().outputVolume   
    print("Output volume: \(volume)")
    

提交回复
热议问题