Browse Source

add button on page

Marino Faggiana 8 years ago
parent
commit
b65c25aec6

+ 1 - 1
iOSClient/Offline/CCCellOffline.xib

@@ -52,7 +52,7 @@
                             <constraint firstAttribute="height" constant="15" id="aQq-XY-pNM"/>
                         </constraints>
                     </imageView>
-                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6B9-Jc-esJ" userLabel="buttonDown">
+                    <button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6B9-Jc-esJ" userLabel="buttonDown">
                         <rect key="frame" x="549" y="18" width="25" height="25"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="25" id="PcN-jN-71v"/>

+ 2 - 0
iOSClient/Offline/CCOfflineContainer.m

@@ -93,12 +93,14 @@
     [self.view addSubview:_pageViewController.view];
     [self.pageViewController didMoveToParentViewController:self];
     
+    /*
     // Enable swipe gesture only for page controller
     for (UIScrollView *view in self.pageViewController.view.subviews) {
         if ([view isKindOfClass:[UIScrollView class]]) {
             view.scrollEnabled = NO;
         }
     }
+    */
 }
 
 // Apparirà

+ 10 - 0
iOSClient/Offline/CCOfflinePageContent.m

@@ -228,6 +228,7 @@
 #pragma mark ===== Swipe Table -> menu =====
 #pragma--------------------------------------------------------------------------------------------
 
+/*
 // more
 - (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath
 {
@@ -405,6 +406,12 @@
 
     [self.tableView setEditing:NO animated:YES];
 }
+*/
+
+-(void)cellButtonDownWasTapped:(id)sender
+{
+    
+}
 
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ==== Table ====
@@ -576,6 +583,9 @@
         }
     }
     
+    // ButtonDown Tapped
+    [cell.buttonDown addTarget:self action:@selector(cellButtonDownWasTapped:) forControlEvents:UIControlEventTouchUpInside];
+    
     // color and font
     if (metadata.cryptated) {
         cell.labelTitle.textColor = COLOR_CRYPTOCLOUD;