Ver código fonte

1.修复Signature Fill All时部分未显示。
2.修改Check Selector消除AccessoryType接口被废弃警告。
3.修复Check Selector初始化时数据和视图没绑定。

Pen Li 9 anos atrás
pai
commit
aa42f4edd4

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 1
Ants Contract/common/AppDelegate.m

@@ -50,10 +50,15 @@
 
     NSLog(@"URL:%@, OPTIONS:%@",[url absoluteString],[RAUtils dict2string:options]);
     
+    if (self.accessMode == AppAccessModeOffline) {
+        [RAUtils message_alert:@"Cann't upload file on offline mode" title:@"Warning" controller:self.window.rootViewController];
+        return NO;
+    }
+    
     NSMutableDictionary* item = [[NSMutableDictionary alloc] init];
     item[@"type"]=[self filetype:url.absoluteString];
     item[@"url"]= [url path];
-    item[@"file_name"] = [url.absoluteString lastPathComponent];
+    item[@"file_name"] = [[url.absoluteString lastPathComponent] stringByRemovingPercentEncoding];
     
     if(self.bLogin)
     {

+ 33 - 12
Ants Contract/common/CheckSelectorViewController.m

@@ -98,24 +98,36 @@
         
         cell.detailTextLabel.text=item_arr[0][1];
     }
+    
+    if ([self.checkedData containsObject:[NSNumber numberWithInteger:indexPath.row]]) {
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
 
     return cell;
 }
-- (UITableViewCellAccessoryType)tableView:(UITableView*)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath*)indexPath
-{
-    if([self.checkedData containsObject:[NSNumber numberWithLong:indexPath.row]])
-    {
-        return UITableViewCellAccessoryCheckmark;
-    }
-    else
-    {
-        return UITableViewCellAccessoryNone;
-    }
-}
+//- (UITableViewCellAccessoryType)tableView:(UITableView*)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath*)indexPath
+//{
+//    if([self.checkedData containsObject:[NSNumber numberWithLong:indexPath.row]])
+//    {
+//        return UITableViewCellAccessoryCheckmark;
+//    }
+//    else
+//    {
+//        return UITableViewCellAccessoryNone;
+//    }
+//}
 #pragma mark tableview delegate
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-        UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+    UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
+    
+//    if (![tableView.delegate respondsToSelector:@selector(tableView:accessoryTypeForRowWithIndexPath:)]) {
+//        cell.accessoryType = [self tableView:tableView accessoryTypeForRowWithIndexPath:indexPath];
+//    }
+    
+    
     if(self.single_select)
     {
         [self.checkedData removeAllObjects];
@@ -137,6 +149,15 @@
         
     }
     
+    // 消除警告:tableView:accessoryTypeForRowWithIndexPath:
+    if([self.checkedData containsObject:[NSNumber numberWithLong:indexPath.row]])
+    {
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+    }
+    else
+    {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
 
    // cell.accessoryType=UITableViewCellAccessoryCheckmark;
     

+ 4 - 0
Ants Contract/common/PageViewController.m

@@ -140,6 +140,9 @@ typedef enum {
 
 - (void)viewWillLayoutSubviews {
     
+    /* 
+     *  解决旋转后第二个视图覆盖部分当前视图
+     */
     
     [self clearControlView];
     
@@ -288,6 +291,7 @@ typedef enum {
     if(self.hide_control)
         return;
 //    return;
+    [self clearControlView]; // fill all时未显示。
     int count = [self.controlTemplate[@"count"] intValue];
     for(int i=0;i<count;i++)
     {