From: Grant Paul Date: Wed, 17 Nov 2010 01:16:43 +0000 (-0800) Subject: Spinner when closing Role controller. The details matter. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/109d42fa484e3966d0c81e88d5e8d17615b1bc94 Spinner when closing Role controller. The details matter. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 6947ff5d..d9b1466f 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7555,11 +7555,22 @@ freeing the view controllers on tab change */ [self showDoneButton]; } -- (void) doneButtonClicked { +- (void) saveAndClose { [self save]; + + [[self navigationItem] setRightBarButtonItem:nil]; [[self navigationController] dismissModalViewControllerAnimated:YES]; } +- (void) doneButtonClicked { + UIActivityIndicatorView *spinner = [[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20.0f, 20.0f)] autorelease]; + [spinner startAnimating]; + UIBarButtonItem *spinItem = [[[UIBarButtonItem alloc] initWithCustomView:spinner] autorelease]; + [[self navigationItem] setRightBarButtonItem:spinItem]; + + [self performSelector:@selector(saveAndClose) withObject:nil afterDelay:0]; +} + - (void) showDoneButton { UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle:UCLocalize("DONE")