diff options
author | Grant Paul <chpwn@chpwn.com> | 2010-11-16 17:16:43 -0800 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2010-11-16 17:16:43 -0800 |
commit | 8576ab50f62f4141e00aca90c96c75266df1375e (patch) | |
tree | 09f1597e5bb905ccef1b31b3ff8773ab9beabc75 | |
parent | fc53bb07527330d8b579d0b90b37a792f4c972d7 (diff) |
Spinner when closing Role controller. The details matter.
-rw-r--r-- | MobileCydia.mm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 6947ff5..d9b1466 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") |