|
@@ -217,14 +217,15 @@
|
|
|
[self.window setTintColor:COLOR_BRAND];
|
|
|
|
|
|
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
|
|
|
- UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
|
|
|
+ //UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
|
|
|
UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
|
|
|
|
|
|
navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem;
|
|
|
splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
|
|
|
|
|
|
// Settings TabBar
|
|
|
- [self createTabBarController:tabBarController];
|
|
|
+ [self createTabBarController];
|
|
|
+ [self plusButton:true];
|
|
|
|
|
|
// passcode
|
|
|
[[BKPasscodeLockScreenManager sharedManager] setDelegate:self];
|
|
@@ -715,6 +716,82 @@
|
|
|
return iconImage;
|
|
|
}
|
|
|
|
|
|
+#pragma --------------------------------------------------------------------------------------------
|
|
|
+#pragma mark ===== TabBarController =====
|
|
|
+#pragma --------------------------------------------------------------------------------------------
|
|
|
+
|
|
|
+- (void)createTabBarController
|
|
|
+{
|
|
|
+ UITabBarItem *item;
|
|
|
+
|
|
|
+ UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
|
|
|
+ UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
|
|
|
+
|
|
|
+ [CCAspect aspectTabBar:tabBarController.tabBar hidden:NO];
|
|
|
+
|
|
|
+ // File
|
|
|
+ item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexFile];
|
|
|
+ [item setTitle:NSLocalizedString(@"_home_", nil)];
|
|
|
+ item.image = [UIImage imageNamed:image_tabBarFile];
|
|
|
+ item.selectedImage = [UIImage imageNamed:image_tabBarFile];
|
|
|
+
|
|
|
+ // Favorite - Local
|
|
|
+ item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexFavorite];
|
|
|
+ if (app.isLocalStorage) {
|
|
|
+ [item setTitle:NSLocalizedString(@"_local_storage_", nil)];
|
|
|
+ item.image = [UIImage imageNamed:image_tabBarLocal];
|
|
|
+ item.selectedImage = [UIImage imageNamed:image_tabBarLocal];
|
|
|
+ } else {
|
|
|
+ [item setTitle:NSLocalizedString(@"_favorites_", nil)];
|
|
|
+ item.image = [UIImage imageNamed:image_tabBarFavorite];
|
|
|
+ item.selectedImage = [UIImage imageNamed:image_tabBarFavorite];
|
|
|
+ }
|
|
|
+
|
|
|
+ // Photos
|
|
|
+ item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexPhotos];
|
|
|
+ [item setTitle:NSLocalizedString(@"_photo_camera_", nil)];
|
|
|
+ item.image = [UIImage imageNamed:image_tabBarPhotos];
|
|
|
+ item.selectedImage = [UIImage imageNamed:image_tabBarPhotos];
|
|
|
+
|
|
|
+ // Settings
|
|
|
+ item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexSettings];
|
|
|
+ [item setTitle:NSLocalizedString(@"_settings_", nil)];
|
|
|
+ item.image = [UIImage imageNamed:image_tabBarSettings];
|
|
|
+ item.selectedImage = [UIImage imageNamed:image_tabBarSettings];
|
|
|
+}
|
|
|
+
|
|
|
+- (BOOL)plusButton:(BOOL)visible
|
|
|
+{
|
|
|
+ UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
|
|
|
+ UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
|
|
|
+
|
|
|
+ UIButton *buttonPlus = [tabBarController.view viewWithTag:99];
|
|
|
+ if (buttonPlus)
|
|
|
+ [buttonPlus removeFromSuperview];
|
|
|
+
|
|
|
+ if (visible) {
|
|
|
+ UIImage *buttonImage = [UIImage imageNamed:@"Plus"];
|
|
|
+ UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ button.tag = 99;
|
|
|
+ button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height);
|
|
|
+ [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
|
|
|
+
|
|
|
+ CGFloat heightDifference = buttonImage.size.height - tabBarController.tabBar.frame.size.height;
|
|
|
+ if (heightDifference < 0)
|
|
|
+ button.center = tabBarController.tabBar.center;
|
|
|
+ else {
|
|
|
+ CGPoint center = tabBarController.tabBar.center;
|
|
|
+ center.y = center.y - 24;//- heightDifference/2.0;
|
|
|
+ button.center = center;
|
|
|
+ }
|
|
|
+
|
|
|
+ [tabBarController.view addSubview:button];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (buttonPlus) return true;
|
|
|
+ else return false;
|
|
|
+}
|
|
|
+
|
|
|
- (void)updateApplicationIconBadgeNumber
|
|
|
{
|
|
|
// Core Data
|
|
@@ -735,10 +812,10 @@
|
|
|
#ifdef CC
|
|
|
|
|
|
/*** DROPBOX ***/
|
|
|
-
|
|
|
+
|
|
|
if ([app.typeCloud isEqualToString:typeCloudDropbox])
|
|
|
if (((DBnetworking *)operation).isExecuting == NO) _queueNunDownload++;
|
|
|
-
|
|
|
+
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -756,7 +833,7 @@
|
|
|
|
|
|
if ([app.typeCloud isEqualToString:typeCloudDropbox])
|
|
|
if (((DBnetworking *)operation).isExecuting == NO) _queueNumDownloadWWan++;
|
|
|
-
|
|
|
+
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -792,8 +869,8 @@
|
|
|
if ([app.typeCloud isEqualToString:typeCloudDropbox])
|
|
|
if (((DBnetworking *)operation).isExecuting == NO) _queueNumUploadWWan++;
|
|
|
#endif
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
// Total
|
|
|
NSUInteger total = _queueNunDownload + _queueNumDownloadWWan + _queueNumUpload + _queueNumUploadWWan + [CCCoreData countTableAutomaticUploadForAccount:self.activeAccount selector:nil];
|
|
|
|
|
@@ -814,64 +891,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-- (void)createTabBarController:(UITabBarController *)tabBarController
|
|
|
-{
|
|
|
- UITabBarItem *item;
|
|
|
-
|
|
|
- [CCAspect aspectTabBar:tabBarController.tabBar hidden:NO];
|
|
|
-
|
|
|
- // File
|
|
|
- item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexFile];
|
|
|
- [item setTitle:NSLocalizedString(@"_home_", nil)];
|
|
|
- item.image = [UIImage imageNamed:image_tabBarFile];
|
|
|
- item.selectedImage = [UIImage imageNamed:image_tabBarFile];
|
|
|
-
|
|
|
- // Favorite - Local
|
|
|
- item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexFavorite];
|
|
|
- if (app.isLocalStorage) {
|
|
|
- [item setTitle:NSLocalizedString(@"_local_storage_", nil)];
|
|
|
- item.image = [UIImage imageNamed:image_tabBarLocal];
|
|
|
- item.selectedImage = [UIImage imageNamed:image_tabBarLocal];
|
|
|
- } else {
|
|
|
- [item setTitle:NSLocalizedString(@"_favorites_", nil)];
|
|
|
- item.image = [UIImage imageNamed:image_tabBarFavorite];
|
|
|
- item.selectedImage = [UIImage imageNamed:image_tabBarFavorite];
|
|
|
- }
|
|
|
-
|
|
|
- // Photos
|
|
|
- item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexPhotos];
|
|
|
- [item setTitle:NSLocalizedString(@"_photo_camera_", nil)];
|
|
|
- item.image = [UIImage imageNamed:image_tabBarPhotos];
|
|
|
- item.selectedImage = [UIImage imageNamed:image_tabBarPhotos];
|
|
|
-
|
|
|
- // Settings
|
|
|
- item = [tabBarController.tabBar.items objectAtIndex:TabBarApplicationIndexSettings];
|
|
|
- [item setTitle:NSLocalizedString(@"_settings_", nil)];
|
|
|
- item.image = [UIImage imageNamed:image_tabBarSettings];
|
|
|
- item.selectedImage = [UIImage imageNamed:image_tabBarSettings];
|
|
|
-
|
|
|
- /*
|
|
|
- UIImage *buttonImage = [UIImage imageNamed:image_brandNavigationController];
|
|
|
-
|
|
|
- UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
- button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height);
|
|
|
- [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
|
|
|
- //[button setBackgroundImage:highlightImage forState:UIControlStateHighlighted];
|
|
|
-
|
|
|
- CGFloat heightDifference = buttonImage.size.height - tabBarController.tabBar.frame.size.height;
|
|
|
- if (heightDifference < 0)
|
|
|
- button.center = tabBarController.tabBar.center;
|
|
|
- else
|
|
|
- {
|
|
|
- CGPoint center = tabBarController.tabBar.center;
|
|
|
- center.y = center.y - heightDifference/2.0;
|
|
|
- button.center = center;
|
|
|
- }
|
|
|
-
|
|
|
- [tabBarController.view addSubview:button];
|
|
|
- */
|
|
|
-}
|
|
|
-
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
|
#pragma mark ===== Media Player Control =====
|
|
|
#pragma --------------------------------------------------------------------------------------------
|