Question

Hi I have tried multiple things combining knowledge of mine and the internet but I cannot find a way to check if an NSInteger is between 10 and 20.

Would it be something like this? (it didn't work)

if (FXVolumeSlider.value == 10-20) {}

Thanks in advance

Was it helpful?

Solution

Inclusive...

if (FXVolumeSlider.value >= 10 && FXVolumeSlider.value <= 20) {}

Exclusive...

if (FXVolumeSlider.value > 10 && FXVolumeSlider.value < 20) {}

OTHER TIPS

try this:

 if(FXVolumeSlider.value>=10 &&  FXVolumeSlider.value<=20)
{

  //your stuff
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top