Browse Source

control center page

Marino Faggiana 8 years ago
parent
commit
d8bb8f0fec

+ 1 - 0
iOSClient/MenuAccount+ControlCenter/CCControlCenter.h

@@ -32,6 +32,7 @@
 @property (nonatomic) BOOL isPopGesture;
 @property (nonatomic) BOOL isOpen;
 
+@property (strong, nonatomic) UILabel *noRecord;
 @property (strong, nonatomic) UIPageViewController *pageViewController;
 @property (strong, nonatomic) NSArray *pageType;
 @property (strong, nonatomic) NSString *currentPageType;

+ 0 - 3
iOSClient/MenuAccount+ControlCenter/CCControlCenter.m

@@ -40,7 +40,6 @@
 @interface CCControlCenter ()
 {
     UIVisualEffectView *_mainView;
-    UILabel *_noRecord;
     UIImageView *_imageDrag;
     UIView *_endLine;
     
@@ -105,8 +104,6 @@
     _noRecord.textColor = COLOR_CONTROL_CENTER;
     _noRecord.font = [UIFont systemFontOfSize:SIZE_FONT_NORECORD];
     _noRecord.textAlignment = NSTextAlignmentCenter;
-    _noRecord.text = NSLocalizedString(@"_no_transfer_",nil);
-    _noRecord.hidden = YES;
 
     [_mainView addSubview:_noRecord];
     

+ 19 - 0
iOSClient/MenuAccount+ControlCenter/CCControlCenterActivity.m

@@ -39,6 +39,25 @@
     _tableView.backgroundColor = [UIColor greenColor];
 }
 
+// Apparirà
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    app.controlCenter.noRecord.hidden = YES;
+}
+
+// E' arrivato
+- (void)viewDidAppear:(BOOL)animated
+{
+    [super viewDidAppear:animated];
+}
+
+- (void)didReceiveMemoryWarning {
+    
+    [super didReceiveMemoryWarning];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark - ==== Table ====
 #pragma --------------------------------------------------------------------------------------------

+ 10 - 2
iOSClient/MenuAccount+ControlCenter/CCControlCenterTransfer.m

@@ -75,6 +75,7 @@
 }
 
 - (void)didReceiveMemoryWarning {
+    
     [super didReceiveMemoryWarning];
 }
 
@@ -242,8 +243,15 @@
         
         _sectionDataSource  = [CCSection creataDataSourseSectionMetadata:recordsTableMetadata listProgressMetadata:app.listProgressMetadata groupByField:@"session" replaceDateToExifDate:NO activeAccount:app.activeAccount];
         
-        //if ([_sectionDataSource.allRecordsDataSource count] == 0) _noRecord.hidden = NO;
-        //else _noRecord.hidden = YES;
+        if ([_sectionDataSource.allRecordsDataSource count] == 0) {
+            
+            app.controlCenter.noRecord.text = NSLocalizedString(@"_no_transfer_",nil);
+            app.controlCenter.noRecord.hidden = NO;
+            
+        } else {
+            
+            app.controlCenter.noRecord.hidden = YES;
+        }
     }
     
     [_tableView reloadData];

+ 2 - 1
iOSClient/en.lproj/Localizable.strings

@@ -483,9 +483,10 @@
 
 "_destiny_folder_"                  = "Folder : %@";
 
-// List Transfers
+// Control Center
 
 "_no_transfer_"                     = "No transfer";
+"_transfers_"                       = "Transfers";
 
 // Offline