|
@@ -30,6 +30,7 @@
|
|
|
@interface CCAdvanced ()
|
|
|
{
|
|
|
AppDelegate *appDelegate;
|
|
|
+ CCHud *_hud;
|
|
|
}
|
|
|
@end
|
|
|
|
|
@@ -189,7 +190,8 @@
|
|
|
|
|
|
self.title = NSLocalizedString(@"_advanced_", nil);
|
|
|
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
-
|
|
|
+ _hud = [[CCHud alloc] initWithView:[[[UIApplication sharedApplication] delegate] window]];
|
|
|
+
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:k_notificationCenter_changeTheming object:nil];
|
|
|
[self changeTheming];
|
|
|
}
|
|
@@ -272,6 +274,8 @@
|
|
|
|
|
|
[appDelegate maintenanceMode:NO];
|
|
|
|
|
|
+ [_hud hideHud];
|
|
|
+
|
|
|
// Inizialized home
|
|
|
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_initializeMain object:nil userInfo:nil];
|
|
|
}
|
|
@@ -282,11 +286,12 @@
|
|
|
|
|
|
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:NSLocalizedString(@"_want_delete_cache_", nil) preferredStyle:UIAlertControllerStyleActionSheet];
|
|
|
|
|
|
- [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_yes_", nil)
|
|
|
- style:UIAlertActionStyleDefault
|
|
|
- handler:^(UIAlertAction *action) {
|
|
|
- [self clearCache];
|
|
|
- }]];
|
|
|
+ [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_yes_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
|
|
+ [_hud visibleHudTitle:NSLocalizedString(@"_wait_", nil) mode:MBProgressHUDModeIndeterminate color:nil];
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
|
|
|
+ [self clearCache];
|
|
|
+ });
|
|
|
+ }]];
|
|
|
|
|
|
[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
|
}]];
|