Просмотр исходного кода

1.修改iOS Apex Mobile搜索条件显隐控制不能将最后一条隐藏项设置为显示。

Pen Li 8 лет назад
Родитель
Сommit
b39369b865
1 измененных файлов с 15 добавлено и 4 удалено
  1. 15 4
      Apex Mobile/Apex Mobile/CustomizeFieldViewController.m

+ 15 - 4
Apex Mobile/Apex Mobile/CustomizeFieldViewController.m

@@ -226,11 +226,22 @@
 {
       DebugLog(@"canMoveRowAtIndexPath");
 
-    if([tableView numberOfRowsInSection:indexPath.section]>1)
-        return true;
-    else
-        return false;
+//    if([tableView numberOfRowsInSection:indexPath.section]>1)
+//        return true;
+//    else
+//        return false;
+    
+    if (indexPath.section == 0 && [tableView numberOfRowsInSection:indexPath.section] == 1) {
+        return NO;
+    } else {
+        return YES;
+    }
 }
+
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+    return YES;
+}
+
 - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
 {
     NSMutableArray * from;