我的应用程序中有UISwitchIBAction,它是:-(IBAction)nearMeSwitchAction:(UISwitch*)sender{if(nearMeSwitch.isOn)[selfgetLocation];[selfmyMethod];}-(void)getLocation{mycode...[nearMeSwitchsetOn:NOanimated:YES];}在我的getLocation方法中,我使用了[nearMeSwitchsetOn:NOanimated:YES]当我点击我的按钮时再次调用nearMeSwitchAction转变。因此myMethod被