From 8576ab50f62f4141e00aca90c96c75266df1375e Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Tue, 16 Nov 2010 17:16:43 -0800 Subject: [PATCH] Spinner when closing Role controller. The details matter. --- MobileCydia.mm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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") -- 2.45.2