andreamazz / SubtleVolume

Replace the system volume popup with a more subtle indicator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample project error

annjawn opened this issue · comments

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)
  }

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

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