Pregunta

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

¿Fue útil?

Solución

Inclusive...

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

Exclusive...

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

Otros consejos

try this:

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

  //your stuff
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top