Explorar o código

1.修改RedAnt Mobile,Predef Query增加数据。

Pen Li %!s(int64=8) %!d(string=hai) anos
pai
achega
a1545b6036

BIN=BIN
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 5
RedAnt Mobile/RedAnt Mobile/ResultViewController.m

@@ -141,11 +141,12 @@ static const int delta = 25;
 //    self.scrollview.contentSize=self.tableview.frame.size;
     
     // auto layout
-    int width=[self.content_layout[@"header"][@"width"] intValue];
-    if(width<self.view.frame.size.width)
-        width=self.view.frame.size.width;
-    self.w_constraint.constant = width - CGRectGetWidth(self.view.bounds);
-    self.h_constraint.constant = 0;
+//    int width=[self.content_layout[@"header"][@"width"] intValue];
+//    if(width<self.view.frame.size.width)
+//        width=self.view.frame.size.width;
+//    self.w_constraint.constant = width - CGRectGetWidth(self.view.bounds);
+//    self.h_constraint.constant = 0;
+    [self updateTableFrame];
     
 }
 #pragma mark - TableView DataSource

+ 92 - 1
RedAnt Mobile/RedAnt Mobile/predef_query.json

@@ -1,7 +1,7 @@
 {
     "result": 2,
     "data": {
-        "count": 4,
+        "count": 17,
         "item_0": [
                    "1",
                    "8533-UPK",
@@ -29,6 +29,97 @@
                    "$ 1123.45",
                    "143",
                    "Desk & chair UILongPressGestureRecognizer *longPress"
+                   ],
+        "item_4": [
+                   "1",
+                   "8533-UPK",
+                   "$ 123.45",
+                   "43",
+                   "metal table with 4 chairs"
+                   ],
+        "item_5": [
+                   "2",
+                   "315318",
+                   "$ 99.49",
+                   "13",
+                   "WOOD table with 4 chairs"
+                   ],
+        "item_6": [
+                   "3",
+                   "7033566",
+                   "$ 13.45",
+                   "57",
+                   "bed"
+                   ],
+        "item_7": [
+                   "4",
+                   "8533-UVR",
+                   "$ 1123.45",
+                   "143",
+                   "Desk & chair UILongPressGestureRecognizer *longPress"
+                   ],
+        "item_8": [
+                   "1",
+                   "8533-UPK",
+                   "$ 123.45",
+                   "43",
+                   "metal table with 4 chairs"
+                   ],
+        "item_9": [
+                   "2",
+                   "315318",
+                   "$ 99.49",
+                   "13",
+                   "WOOD table with 4 chairs"
+                   ],
+        "item_10": [
+                   "3",
+                   "7033566",
+                   "$ 13.45",
+                   "57",
+                   "bed"
+                    ],
+        "item_11": [
+                   "1",
+                   "8533-UPK",
+                   "$ 123.45",
+                   "43",
+                   "metal table with 4 chairs"
+                   ],
+        "item_12": [
+                   "2",
+                   "315318",
+                   "$ 99.49",
+                   "13",
+                   "WOOD table with 4 chairs"
+                   ],
+        "item_13": [
+                   "3",
+                   "7033566",
+                   "$ 13.45",
+                   "57",
+                   "bed"
+                    ],
+        "item_14": [
+                   "1",
+                   "8533-UPK",
+                   "$ 123.45",
+                   "43",
+                   "metal table with 4 chairs"
+                   ],
+        "item_15": [
+                   "2",
+                   "315318",
+                   "$ 99.49",
+                   "13",
+                   "WOOD table with 4 chairs"
+                   ],
+        "item_16": [
+                   "3",
+                   "7033566",
+                   "$ 13.45",
+                   "57",
+                   "bed"
                    ]
     },
     "layout": {