سؤال

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

هل كانت مفيدة؟

المحلول

Inclusive...

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

Exclusive...

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

نصائح أخرى

try this:

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

  //your stuff
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top