部分的なカールを使用しているときにアクションを停止および開始するにはどうすればよいですか? viewWillDisappear
関数を試してみましたviewWillAppear
が、現在のView Controllerで機能を試しましたが、settingsViewControllerに切り替えて戻ったときに呼び出されないようでした。
私も私の中でこれを試しましたfirst VC
TwistmAppDelegate *AppDelegate = [[UIApplication sharedApplication] delegate];
AppDelegate.timer = [NSTimer scheduledTimerWithTimeInterval:30.0
target:self
selector:@selector(resetSpin:)
userInfo:nil
repeats:YES];
そしてこれは私のsecond VC
:
TwistmAppDelegate *AppDelegate = [[UIApplication sharedApplication] delegate];
[AppDelegate.timer invalidate];
しかし、これもうまくいかないようです。