Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我尝试了多种结合我的知识和互联网知识的方法,但我找不到检查 NSInteger 是否在 10 到 20 之间的方法。
会是这样吗?(它没有工作)
if (FXVolumeSlider.value == 10-20) {}
提前致谢
包括的...
if (FXVolumeSlider.value >= 10 && FXVolumeSlider.value <= 20) {}
独家的...
if (FXVolumeSlider.value > 10 && FXVolumeSlider.value < 20) {}
试试这个:
if(FXVolumeSlider.value>=10 && FXVolumeSlider.value<=20) { //your stuff }