I am trying to get my iPhone app to restart programmatically when the Logout button is pressed.
Has anyone got a code sample to share? I\'ve read that it is possible
Put this in a UIAlertAction asking the user "Save and Quit". It will animate the exit(0) so at least it looks planned.
- (void)saveAndQuit
{
[UIView animateWithDuration:0.8 animations:^{
self.window.alpha = 0.0; // fade out...
// ... while pinching to a point
self.window.transform = CGAffineTransformScale(
CGAffineTransformMakeTranslation( 0, 0 ), 0.1, 0.1 );
} completion:^(BOOL finished) {
exit(0);
}];
}