Upvote:1

dispatch_async(dispatch_get_main_queue(), ^{
    UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"Success!"
                                                 message:@"Online sync is now enabled."
                                                delegate:self
                                       cancelButtonTitle:@"OK"
    [av show];
});

More Answer related to the Same Query

Upvote:1

[[self navigationController] popToRootViewControllerAnimated:YES];

Credit Goes to: stackoverflow.com

Related question with same questions but different answers