Questions tagged «uiswitch»


12
iOS7 UISwitch的事件值已更改:该Bug或什么..连续调用?
编辑 现在固定在 ios7.1 不要做任何调整来修复它。 编辑2 显然,相同的问题在iOS 8.0和8.1中再次发生 编辑3 现在固定在 ios9.2 不要做任何调整来修复它。 今天,嗨,我看到在UISwitch's事件ValueChanged:中调用continuously ,而我的改变On来Off或者Off到在我的手指还在移动在右侧和左侧。我使用NSLog使GIF图像更加清晰。 我的价值更改方法是: - (IBAction)changeSwitch:(id)sender{ if([sender isOn]){ NSLog(@"Switch is ON"); } else{ NSLog(@"Switch is OFF"); } } iOS6与Switch相同的代码可以正常工作,正如我们期望的那样: 因此任何人都可以建议我仅将其状态打开或关闭一次。还是这是错误还是什么? 更新 这是我的演示: 编程添加UISwitch 从XIB添加UISwitch
93 ios  iphone  ios7  xcode5  uiswitch 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.