andreamazz / SubtleVolume

Replace the system volume popup with a more subtle indicator.
MIT License
1.2k stars 63 forks source link

Sample project error #18

Closed annjawn closed 6 years ago

annjawn commented 6 years ago

The sample project is giving this error when I tap the volume + button.

Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: SubtleVolume.SubtleVolumeError.unableToChangeVolumeLevel

And this is where it fails-

@IBAction func plusAction() {
    try! volume.setVolumeLevel(volume.volumeLevel + 0.05, animated: true)
  }
andreamazz commented 6 years ago

Are you running on the simulator? It doesn't work there, you need a device.

annjawn commented 6 years ago

@andreamazz didn't realize that was the requirement. I'll give it a try. thanks.