How can I call Method while app is in background in iOS?
问题 I have one class name as myClassCalculate have the following method - (void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { NSLog(@"Accelerometer is called"); } I am making object in - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch myObject = [[myClassCalculate alloc] init]; now when app will go in background, I want this - (void) accelerometer:(UIAccelerometer *