Pārlūkot izejas kodu

1.完成iOS Apex & Drivers登陆、Order List以及Order Detail。

Pen Li 8 gadi atpakaļ
vecāks
revīzija
92b1215dd0
65 mainītis faili ar 4035 papildinājumiem un 60 dzēšanām
  1. 455 11
      Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj
  2. 32 1
      Redant Drivers/Apex And Drivers/AppDelegate.m
  3. 17 0
      Redant Drivers/Apex And Drivers/BaseViewController/RABaseViewController.h
  4. 36 0
      Redant Drivers/Apex And Drivers/BaseViewController/RABaseViewController.m
  5. 16 0
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.h
  6. 33 0
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.m
  7. 23 0
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionsLayout.h
  8. 66 0
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionsLayout.m
  9. 13 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.h
  10. 30 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.m
  11. 13 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDelegate.h
  12. 13 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDelegate.m
  13. 20 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.h
  14. 65 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.m
  15. 16 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.h
  16. 56 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m
  17. 16 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.h
  18. 44 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.m
  19. 16 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.h
  20. 46 0
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.m
  21. 233 0
      Redant Drivers/Apex And Drivers/Detail/Detail.storyboard
  22. 21 0
      Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.h
  23. 17 0
      Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.m
  24. 24 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.h
  25. 115 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.m
  26. 24 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.h
  27. 17 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.m
  28. 16 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.h
  29. 56 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.m
  30. 15 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultLineModel.h
  31. 51 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultLineModel.m
  32. 17 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailSingleLineModel.h
  33. 50 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailSingleLineModel.m
  34. 13 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.h
  35. 76 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m
  36. 13 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDelegate.h
  37. 40 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDelegate.m
  38. 21 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.h
  39. 200 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m
  40. 186 0
      Redant Drivers/Apex And Drivers/FakeData/fake_order_detail.json
  41. 95 0
      Redant Drivers/Apex And Drivers/FakeData/fake_order_list.json
  42. 148 0
      Redant Drivers/Apex And Drivers/Home/Home.storyboard
  43. 26 0
      Redant Drivers/Apex And Drivers/Home/RAHomeOrderModel.h
  44. 17 0
      Redant Drivers/Apex And Drivers/Home/RAHomeOrderModel.m
  45. 13 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.h
  46. 33 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.m
  47. 13 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.h
  48. 42 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.m
  49. 27 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController.h
  50. 160 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m
  51. 16 0
      Redant Drivers/Apex And Drivers/Home/RAOrderCell.h
  52. 90 0
      Redant Drivers/Apex And Drivers/Home/RAOrderCell.m
  53. 0 4
      Redant Drivers/Apex And Drivers/Info.plist
  54. 242 0
      Redant Drivers/Apex And Drivers/Login/Login.storyboard
  55. 29 0
      Redant Drivers/Apex And Drivers/Login/LoginViewController.h
  56. 293 0
      Redant Drivers/Apex And Drivers/Login/LoginViewController.m
  57. 20 0
      Redant Drivers/Apex And Drivers/Login/RetrievePasswordViewController.h
  58. 149 0
      Redant Drivers/Apex And Drivers/Login/RetrievePasswordViewController.m
  59. 25 0
      Redant Drivers/Apex And Drivers/PrefixHeader.pch
  60. 21 0
      Redant Drivers/Apex And Drivers/RADataProvider.h
  61. 206 0
      Redant Drivers/Apex And Drivers/RADataProvider.m
  62. 0 15
      Redant Drivers/Apex And Drivers/ViewController.h
  63. 0 29
      Redant Drivers/Apex And Drivers/ViewController.m
  64. 15 0
      Redant Drivers/Apex And Drivers/config.h
  65. 124 0
      Redant Drivers/Apex And Drivers/const.h

+ 455 - 11
Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj

@@ -7,8 +7,56 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		4205FD4420C0F2C000DB42B4 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4205FD4320C0F2C000DB42B4 /* Login.storyboard */; };
+		4205FD4820C0F33500DB42B4 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD4720C0F33500DB42B4 /* LoginViewController.m */; };
+		4205FD4B20C0F4C400DB42B4 /* RetrievePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD4A20C0F4C300DB42B4 /* RetrievePasswordViewController.m */; };
+		4205FD5320C0F50C00DB42B4 /* JLCustomerAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD4E20C0F50C00DB42B4 /* JLCustomerAlertController.m */; };
+		4205FD5420C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD5020C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m */; };
+		4205FD5520C0F50C00DB42B4 /* JLPresentationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD5220C0F50C00DB42B4 /* JLPresentationController.m */; };
+		4205FD5820C0F6F100DB42B4 /* RAConvertor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD5720C0F6F100DB42B4 /* RAConvertor.m */; };
+		4205FD5C20C1316200DB42B4 /* RABaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD5B20C1316200DB42B4 /* RABaseViewController.m */; };
+		4205FD6120C135CF00DB42B4 /* RAHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD6020C135CF00DB42B4 /* RAHomeViewController.m */; };
+		4205FD6320C136F900DB42B4 /* Home.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4205FD6220C136F900DB42B4 /* Home.storyboard */; };
+		4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD6520C13BF400DB42B4 /* RAOrderCell.m */; };
+		4205FD6C20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD6B20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m */; };
+		4205FD6F20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD6E20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m */; };
+		4205FD7220C1465400DB42B4 /* RAHomeOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4205FD7120C1465400DB42B4 /* RAHomeOrderModel.m */; };
+		42529D2120C0E8EC000C0F4D /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2020C0E8EC000C0F4D /* NetworkUtils.m */; };
+		42529D2520C0E97E000C0F4D /* RADataProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2420C0E97E000C0F4D /* RADataProvider.m */; };
+		42529D2B20C0EA0A000C0F4D /* RAUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2A20C0EA0A000C0F4D /* RAUtils.m */; };
+		42529D3920C0EA3F000C0F4D /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2F20C0EA3F000C0F4D /* ioapi.c */; };
+		42529D3A20C0EA3F000C0F4D /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3120C0EA3F000C0F4D /* mztools.c */; };
+		42529D3B20C0EA3F000C0F4D /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3320C0EA3F000C0F4D /* unzip.c */; };
+		42529D3C20C0EA3F000C0F4D /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3520C0EA3F000C0F4D /* zip.c */; };
+		42529D3D20C0EA3F000C0F4D /* ZipArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3820C0EA3F000C0F4D /* ZipArchive.mm */; };
+		42529D4020C0EA59000C0F4D /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3F20C0EA59000C0F4D /* Reachability.m */; };
+		42529D4320C0EB01000C0F4D /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D4220C0EB01000C0F4D /* RANetworkTaskDelegate.m */; };
+		4280034120C0F146004D4F50 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033920C0F145004D4F50 /* AESCrypt.m */; };
+		4280034220C0F146004D4F50 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 4280033A20C0F145004D4F50 /* LICENSE */; };
+		4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033C20C0F145004D4F50 /* NSData+Base64.m */; };
+		4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */; };
+		4280034520C0F146004D4F50 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280034020C0F145004D4F50 /* NSString+Base64.m */; };
+		42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8A220C2253E001C125F /* fake_order_list.json */; };
+		42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */; };
+		42D8B8AA20C23DF0001C125F /* Detail.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8A920C23DF0001C125F /* Detail.storyboard */; };
+		42D8B8AE20C245D5001C125F /* RADetailSingleLineCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8AD20C245D5001C125F /* RADetailSingleLineCell.m */; };
+		42D8B8B120C2462D001C125F /* RADetailMultLineCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8B020C2462D001C125F /* RADetailMultLineCell.m */; };
+		42D8B8B420C2463D001C125F /* RADetailLocationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8B320C2463D001C125F /* RADetailLocationCell.m */; };
+		42D8B8B720C24656001C125F /* RADetailActionsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8B620C24656001C125F /* RADetailActionsCell.m */; };
+		42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8BA20C2486C001C125F /* RADetailActionSubCell.m */; };
+		42D8B8BF20C24A92001C125F /* RADetailSingleLineModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8BE20C24A92001C125F /* RADetailSingleLineModel.m */; };
+		42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8C120C24AA6001C125F /* RADetailMultLineModel.m */; };
+		42D8B8C520C24AB4001C125F /* RADetailLocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8C420C24AB4001C125F /* RADetailLocationModel.m */; };
+		42D8B8C820C24B0B001C125F /* RADetailActionCollectionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8C720C24B0B001C125F /* RADetailActionCollectionModel.m */; };
+		42D8B8CC20C24B27001C125F /* RADetailActionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8CB20C24B27001C125F /* RADetailActionModel.m */; };
+		42D8B8CF20C2657D001C125F /* RADetailBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8CE20C2657D001C125F /* RADetailBaseModel.m */; };
+		42D8B8D220C267C7001C125F /* RADetailActionsLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8D120C267C7001C125F /* RADetailActionsLayout.m */; };
+		42D8B8D520C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8D420C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m */; };
+		42D8B8D820C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8D720C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m */; };
+		42D8B8DB20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8DA20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m */; };
+		42D8B8DE20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8DD20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m */; };
+		42D8B8E020C28755001C125F /* fake_order_detail.json in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8DF20C28755001C125F /* fake_order_detail.json */; };
 		71EAA33320B9571B002F003C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EAA33220B9571B002F003C /* AppDelegate.m */; };
-		71EAA33620B9571B002F003C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EAA33520B9571B002F003C /* ViewController.m */; };
 		71EAA33920B9571B002F003C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33720B9571B002F003C /* Main.storyboard */; };
 		71EAA33B20B95720002F003C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33A20B95720002F003C /* Assets.xcassets */; };
 		71EAA33E20B95720002F003C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33C20B95720002F003C /* LaunchScreen.storyboard */; };
@@ -16,11 +64,105 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		4205FD4320C0F2C000DB42B4 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = "<group>"; };
+		4205FD4620C0F33500DB42B4 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
+		4205FD4720C0F33500DB42B4 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
+		4205FD4920C0F4C300DB42B4 /* RetrievePasswordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RetrievePasswordViewController.h; sourceTree = "<group>"; };
+		4205FD4A20C0F4C300DB42B4 /* RetrievePasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RetrievePasswordViewController.m; sourceTree = "<group>"; };
+		4205FD4D20C0F50C00DB42B4 /* JLCustomerAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLCustomerAlertController.h; sourceTree = "<group>"; };
+		4205FD4E20C0F50C00DB42B4 /* JLCustomerAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLCustomerAlertController.m; sourceTree = "<group>"; };
+		4205FD4F20C0F50C00DB42B4 /* JLCustomerNavigationAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLCustomerNavigationAlertController.h; sourceTree = "<group>"; };
+		4205FD5020C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLCustomerNavigationAlertController.m; sourceTree = "<group>"; };
+		4205FD5120C0F50C00DB42B4 /* JLPresentationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLPresentationController.h; sourceTree = "<group>"; };
+		4205FD5220C0F50C00DB42B4 /* JLPresentationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLPresentationController.m; sourceTree = "<group>"; };
+		4205FD5620C0F6F100DB42B4 /* RAConvertor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAConvertor.h; path = ../../common/RAConvertor.h; sourceTree = "<group>"; };
+		4205FD5720C0F6F100DB42B4 /* RAConvertor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAConvertor.m; path = ../../common/RAConvertor.m; sourceTree = "<group>"; };
+		4205FD5A20C1316200DB42B4 /* RABaseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RABaseViewController.h; sourceTree = "<group>"; };
+		4205FD5B20C1316200DB42B4 /* RABaseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RABaseViewController.m; sourceTree = "<group>"; };
+		4205FD5F20C135CF00DB42B4 /* RAHomeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAHomeViewController.h; sourceTree = "<group>"; };
+		4205FD6020C135CF00DB42B4 /* RAHomeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAHomeViewController.m; sourceTree = "<group>"; };
+		4205FD6220C136F900DB42B4 /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = "<group>"; };
+		4205FD6420C13BF400DB42B4 /* RAOrderCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAOrderCell.h; sourceTree = "<group>"; };
+		4205FD6520C13BF400DB42B4 /* RAOrderCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAOrderCell.m; sourceTree = "<group>"; };
+		4205FD6A20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAHomeViewController+HomeTableDelegate.h"; sourceTree = "<group>"; };
+		4205FD6B20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAHomeViewController+HomeTableDelegate.m"; sourceTree = "<group>"; };
+		4205FD6D20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAHomeViewController+HomeTableDataSource.h"; sourceTree = "<group>"; };
+		4205FD6E20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAHomeViewController+HomeTableDataSource.m"; sourceTree = "<group>"; };
+		4205FD7020C1465400DB42B4 /* RAHomeOrderModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAHomeOrderModel.h; sourceTree = "<group>"; };
+		4205FD7120C1465400DB42B4 /* RAHomeOrderModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAHomeOrderModel.m; sourceTree = "<group>"; };
+		42529D1F20C0E8EB000C0F4D /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
+		42529D2020C0E8EC000C0F4D /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = ../../common/NetworkUtils.m; sourceTree = "<group>"; };
+		42529D2320C0E97E000C0F4D /* RADataProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADataProvider.h; sourceTree = "<group>"; };
+		42529D2420C0E97E000C0F4D /* RADataProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADataProvider.m; sourceTree = "<group>"; };
+		42529D2720C0E99B000C0F4D /* const.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = const.h; sourceTree = "<group>"; };
+		42529D2920C0EA0A000C0F4D /* RAUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAUtils.h; path = "../../RedAnt ERP Mobile/common/RAUtils.h"; sourceTree = "<group>"; };
+		42529D2A20C0EA0A000C0F4D /* RAUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAUtils.m; path = "../../RedAnt ERP Mobile/common/RAUtils.m"; sourceTree = "<group>"; };
+		42529D2E20C0EA3F000C0F4D /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = "<group>"; };
+		42529D2F20C0EA3F000C0F4D /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = "<group>"; };
+		42529D3020C0EA3F000C0F4D /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = "<group>"; };
+		42529D3120C0EA3F000C0F4D /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = "<group>"; };
+		42529D3220C0EA3F000C0F4D /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = "<group>"; };
+		42529D3320C0EA3F000C0F4D /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = "<group>"; };
+		42529D3420C0EA3F000C0F4D /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = "<group>"; };
+		42529D3520C0EA3F000C0F4D /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = "<group>"; };
+		42529D3620C0EA3F000C0F4D /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = "<group>"; };
+		42529D3720C0EA3F000C0F4D /* ZipArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZipArchive.h; sourceTree = "<group>"; };
+		42529D3820C0EA3F000C0F4D /* ZipArchive.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZipArchive.mm; sourceTree = "<group>"; };
+		42529D3E20C0EA59000C0F4D /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reachability.h; path = "../../RedAnt ERP Mobile/common/Reachability.h"; sourceTree = "<group>"; };
+		42529D3F20C0EA59000C0F4D /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = "../../RedAnt ERP Mobile/common/Reachability.m"; sourceTree = "<group>"; };
+		42529D4120C0EB01000C0F4D /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
+		42529D4220C0EB01000C0F4D /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
+		4280033520C0EE1E004D4F50 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
+		4280033620C0F0C6004D4F50 /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		4280033820C0F145004D4F50 /* AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AESCrypt.h; sourceTree = "<group>"; };
+		4280033920C0F145004D4F50 /* AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AESCrypt.m; sourceTree = "<group>"; };
+		4280033A20C0F145004D4F50 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
+		4280033B20C0F145004D4F50 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
+		4280033C20C0F145004D4F50 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
+		4280033D20C0F145004D4F50 /* NSData+CommonCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+CommonCrypto.h"; sourceTree = "<group>"; };
+		4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+CommonCrypto.m"; sourceTree = "<group>"; };
+		4280033F20C0F145004D4F50 /* NSString+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Base64.h"; sourceTree = "<group>"; };
+		4280034020C0F145004D4F50 /* NSString+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Base64.m"; sourceTree = "<group>"; };
+		42D8B8A220C2253E001C125F /* fake_order_list.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_order_list.json; sourceTree = "<group>"; };
+		42D8B8A620C23DD9001C125F /* RAOrderDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAOrderDetailViewController.h; sourceTree = "<group>"; };
+		42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAOrderDetailViewController.m; sourceTree = "<group>"; };
+		42D8B8A920C23DF0001C125F /* Detail.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Detail.storyboard; sourceTree = "<group>"; };
+		42D8B8AC20C245D5001C125F /* RADetailSingleLineCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailSingleLineCell.h; sourceTree = "<group>"; };
+		42D8B8AD20C245D5001C125F /* RADetailSingleLineCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailSingleLineCell.m; sourceTree = "<group>"; };
+		42D8B8AF20C2462D001C125F /* RADetailMultLineCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailMultLineCell.h; sourceTree = "<group>"; };
+		42D8B8B020C2462D001C125F /* RADetailMultLineCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailMultLineCell.m; sourceTree = "<group>"; };
+		42D8B8B220C2463D001C125F /* RADetailLocationCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailLocationCell.h; sourceTree = "<group>"; };
+		42D8B8B320C2463D001C125F /* RADetailLocationCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailLocationCell.m; sourceTree = "<group>"; };
+		42D8B8B520C24656001C125F /* RADetailActionsCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionsCell.h; sourceTree = "<group>"; };
+		42D8B8B620C24656001C125F /* RADetailActionsCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionsCell.m; sourceTree = "<group>"; };
+		42D8B8B920C2486C001C125F /* RADetailActionSubCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionSubCell.h; sourceTree = "<group>"; };
+		42D8B8BA20C2486C001C125F /* RADetailActionSubCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionSubCell.m; sourceTree = "<group>"; };
+		42D8B8BD20C24A92001C125F /* RADetailSingleLineModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailSingleLineModel.h; sourceTree = "<group>"; };
+		42D8B8BE20C24A92001C125F /* RADetailSingleLineModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailSingleLineModel.m; sourceTree = "<group>"; };
+		42D8B8C020C24AA6001C125F /* RADetailMultLineModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailMultLineModel.h; sourceTree = "<group>"; };
+		42D8B8C120C24AA6001C125F /* RADetailMultLineModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailMultLineModel.m; sourceTree = "<group>"; };
+		42D8B8C320C24AB4001C125F /* RADetailLocationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailLocationModel.h; sourceTree = "<group>"; };
+		42D8B8C420C24AB4001C125F /* RADetailLocationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailLocationModel.m; sourceTree = "<group>"; };
+		42D8B8C620C24B0B001C125F /* RADetailActionCollectionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionCollectionModel.h; sourceTree = "<group>"; };
+		42D8B8C720C24B0B001C125F /* RADetailActionCollectionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionCollectionModel.m; sourceTree = "<group>"; };
+		42D8B8CA20C24B27001C125F /* RADetailActionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionModel.h; sourceTree = "<group>"; };
+		42D8B8CB20C24B27001C125F /* RADetailActionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionModel.m; sourceTree = "<group>"; };
+		42D8B8CD20C2657D001C125F /* RADetailBaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailBaseModel.h; sourceTree = "<group>"; };
+		42D8B8CE20C2657D001C125F /* RADetailBaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailBaseModel.m; sourceTree = "<group>"; };
+		42D8B8D020C267C7001C125F /* RADetailActionsLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionsLayout.h; sourceTree = "<group>"; };
+		42D8B8D120C267C7001C125F /* RADetailActionsLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionsLayout.m; sourceTree = "<group>"; };
+		42D8B8D320C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RADetailActionsCell+CollectionViewDelegate.h"; sourceTree = "<group>"; };
+		42D8B8D420C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RADetailActionsCell+CollectionViewDelegate.m"; sourceTree = "<group>"; };
+		42D8B8D620C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RADetailActionsCell+CollectionViewDataSource.h"; sourceTree = "<group>"; };
+		42D8B8D720C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RADetailActionsCell+CollectionViewDataSource.m"; sourceTree = "<group>"; };
+		42D8B8D920C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAOrderDetailViewController+TableViewDataSource.h"; sourceTree = "<group>"; };
+		42D8B8DA20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAOrderDetailViewController+TableViewDataSource.m"; sourceTree = "<group>"; };
+		42D8B8DC20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAOrderDetailViewController+TableViewDelegate.h"; sourceTree = "<group>"; };
+		42D8B8DD20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAOrderDetailViewController+TableViewDelegate.m"; sourceTree = "<group>"; };
+		42D8B8DF20C28755001C125F /* fake_order_detail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_order_detail.json; sourceTree = "<group>"; };
 		71EAA32E20B9571B002F003C /* Apex And Drivers.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Apex And Drivers.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		71EAA33120B9571B002F003C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		71EAA33220B9571B002F003C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		71EAA33420B9571B002F003C /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
-		71EAA33520B9571B002F003C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		71EAA33820B9571B002F003C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		71EAA33A20B95720002F003C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		71EAA33D20B95720002F003C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -40,6 +182,251 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		4205FD4520C0F33500DB42B4 /* Login */ = {
+			isa = PBXGroup;
+			children = (
+				4205FD4920C0F4C300DB42B4 /* RetrievePasswordViewController.h */,
+				4205FD4A20C0F4C300DB42B4 /* RetrievePasswordViewController.m */,
+				4205FD4320C0F2C000DB42B4 /* Login.storyboard */,
+				4205FD4620C0F33500DB42B4 /* LoginViewController.h */,
+				4205FD4720C0F33500DB42B4 /* LoginViewController.m */,
+			);
+			name = Login;
+			path = "Apex And Drivers/Login";
+			sourceTree = SOURCE_ROOT;
+		};
+		4205FD4C20C0F50C00DB42B4 /* Alert */ = {
+			isa = PBXGroup;
+			children = (
+				4205FD4D20C0F50C00DB42B4 /* JLCustomerAlertController.h */,
+				4205FD4E20C0F50C00DB42B4 /* JLCustomerAlertController.m */,
+				4205FD4F20C0F50C00DB42B4 /* JLCustomerNavigationAlertController.h */,
+				4205FD5020C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m */,
+				4205FD5120C0F50C00DB42B4 /* JLPresentationController.h */,
+				4205FD5220C0F50C00DB42B4 /* JLPresentationController.m */,
+			);
+			name = Alert;
+			path = ../../common/customUI/Alert;
+			sourceTree = "<group>";
+		};
+		4205FD5920C1313F00DB42B4 /* BaseViewController */ = {
+			isa = PBXGroup;
+			children = (
+				4205FD5A20C1316200DB42B4 /* RABaseViewController.h */,
+				4205FD5B20C1316200DB42B4 /* RABaseViewController.m */,
+			);
+			path = BaseViewController;
+			sourceTree = "<group>";
+		};
+		4205FD5D20C134B400DB42B4 /* Other */ = {
+			isa = PBXGroup;
+			children = (
+				71EAA33720B9571B002F003C /* Main.storyboard */,
+				71EAA33A20B95720002F003C /* Assets.xcassets */,
+				71EAA33C20B95720002F003C /* LaunchScreen.storyboard */,
+				71EAA33F20B95720002F003C /* Info.plist */,
+				71EAA34020B95720002F003C /* main.m */,
+			);
+			name = Other;
+			sourceTree = "<group>";
+		};
+		4205FD5E20C1359C00DB42B4 /* Home */ = {
+			isa = PBXGroup;
+			children = (
+				4205FD5F20C135CF00DB42B4 /* RAHomeViewController.h */,
+				4205FD6020C135CF00DB42B4 /* RAHomeViewController.m */,
+				4205FD6A20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.h */,
+				4205FD6B20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m */,
+				4205FD6D20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.h */,
+				4205FD6E20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m */,
+				4205FD6220C136F900DB42B4 /* Home.storyboard */,
+				4205FD6420C13BF400DB42B4 /* RAOrderCell.h */,
+				4205FD6520C13BF400DB42B4 /* RAOrderCell.m */,
+				4205FD7020C1465400DB42B4 /* RAHomeOrderModel.h */,
+				4205FD7120C1465400DB42B4 /* RAHomeOrderModel.m */,
+			);
+			path = Home;
+			sourceTree = "<group>";
+		};
+		42529D1E20C0E8C4000C0F4D /* Network */ = {
+			isa = PBXGroup;
+			children = (
+				42529D4120C0EB01000C0F4D /* RANetworkTaskDelegate.h */,
+				42529D4220C0EB01000C0F4D /* RANetworkTaskDelegate.m */,
+				42529D3E20C0EA59000C0F4D /* Reachability.h */,
+				42529D3F20C0EA59000C0F4D /* Reachability.m */,
+				42529D1F20C0E8EB000C0F4D /* NetworkUtils.h */,
+				42529D2020C0E8EC000C0F4D /* NetworkUtils.m */,
+			);
+			name = Network;
+			sourceTree = "<group>";
+		};
+		42529D2220C0E91E000C0F4D /* DataProvider */ = {
+			isa = PBXGroup;
+			children = (
+				42529D2320C0E97E000C0F4D /* RADataProvider.h */,
+				42529D2420C0E97E000C0F4D /* RADataProvider.m */,
+			);
+			name = DataProvider;
+			sourceTree = "<group>";
+		};
+		42529D2620C0E98A000C0F4D /* Config */ = {
+			isa = PBXGroup;
+			children = (
+				42529D2720C0E99B000C0F4D /* const.h */,
+				4280033620C0F0C6004D4F50 /* config.h */,
+				4280033520C0EE1E004D4F50 /* PrefixHeader.pch */,
+			);
+			name = Config;
+			sourceTree = "<group>";
+		};
+		42529D2820C0E9CE000C0F4D /* Utils */ = {
+			isa = PBXGroup;
+			children = (
+				4280033720C0F145004D4F50 /* AES */,
+				42529D2C20C0EA3F000C0F4D /* zip */,
+				42529D2920C0EA0A000C0F4D /* RAUtils.h */,
+				42529D2A20C0EA0A000C0F4D /* RAUtils.m */,
+				4205FD5620C0F6F100DB42B4 /* RAConvertor.h */,
+				4205FD5720C0F6F100DB42B4 /* RAConvertor.m */,
+			);
+			name = Utils;
+			sourceTree = "<group>";
+		};
+		42529D2C20C0EA3F000C0F4D /* zip */ = {
+			isa = PBXGroup;
+			children = (
+				42529D2D20C0EA3F000C0F4D /* minizip */,
+				42529D3720C0EA3F000C0F4D /* ZipArchive.h */,
+				42529D3820C0EA3F000C0F4D /* ZipArchive.mm */,
+			);
+			name = zip;
+			path = "../../RedAnt ERP Mobile/common/zip";
+			sourceTree = "<group>";
+		};
+		42529D2D20C0EA3F000C0F4D /* minizip */ = {
+			isa = PBXGroup;
+			children = (
+				42529D2E20C0EA3F000C0F4D /* crypt.h */,
+				42529D2F20C0EA3F000C0F4D /* ioapi.c */,
+				42529D3020C0EA3F000C0F4D /* ioapi.h */,
+				42529D3120C0EA3F000C0F4D /* mztools.c */,
+				42529D3220C0EA3F000C0F4D /* mztools.h */,
+				42529D3320C0EA3F000C0F4D /* unzip.c */,
+				42529D3420C0EA3F000C0F4D /* unzip.h */,
+				42529D3520C0EA3F000C0F4D /* zip.c */,
+				42529D3620C0EA3F000C0F4D /* zip.h */,
+			);
+			path = minizip;
+			sourceTree = "<group>";
+		};
+		4280033720C0F145004D4F50 /* AES */ = {
+			isa = PBXGroup;
+			children = (
+				4280033820C0F145004D4F50 /* AESCrypt.h */,
+				4280033920C0F145004D4F50 /* AESCrypt.m */,
+				4280033A20C0F145004D4F50 /* LICENSE */,
+				4280033B20C0F145004D4F50 /* NSData+Base64.h */,
+				4280033C20C0F145004D4F50 /* NSData+Base64.m */,
+				4280033D20C0F145004D4F50 /* NSData+CommonCrypto.h */,
+				4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */,
+				4280033F20C0F145004D4F50 /* NSString+Base64.h */,
+				4280034020C0F145004D4F50 /* NSString+Base64.m */,
+			);
+			name = AES;
+			path = ../../common/AES;
+			sourceTree = "<group>";
+		};
+		42D8B8A120C224EE001C125F /* FakeData */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8DF20C28755001C125F /* fake_order_detail.json */,
+				42D8B8A220C2253E001C125F /* fake_order_list.json */,
+			);
+			path = FakeData;
+			sourceTree = "<group>";
+		};
+		42D8B8A420C23D69001C125F /* Detail */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8BC20C24A77001C125F /* Model */,
+				42D8B8AB20C245A9001C125F /* Cell */,
+				42D8B8A620C23DD9001C125F /* RAOrderDetailViewController.h */,
+				42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */,
+				42D8B8A920C23DF0001C125F /* Detail.storyboard */,
+				42D8B8D920C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.h */,
+				42D8B8DA20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m */,
+				42D8B8DC20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.h */,
+				42D8B8DD20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m */,
+			);
+			path = Detail;
+			sourceTree = "<group>";
+		};
+		42D8B8A520C23D75001C125F /* Update */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Update;
+			sourceTree = "<group>";
+		};
+		42D8B8AB20C245A9001C125F /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8AC20C245D5001C125F /* RADetailSingleLineCell.h */,
+				42D8B8AD20C245D5001C125F /* RADetailSingleLineCell.m */,
+				42D8B8AF20C2462D001C125F /* RADetailMultLineCell.h */,
+				42D8B8B020C2462D001C125F /* RADetailMultLineCell.m */,
+				42D8B8B220C2463D001C125F /* RADetailLocationCell.h */,
+				42D8B8B320C2463D001C125F /* RADetailLocationCell.m */,
+				42D8B8B520C24656001C125F /* RADetailActionsCell.h */,
+				42D8B8B620C24656001C125F /* RADetailActionsCell.m */,
+				42D8B8D320C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.h */,
+				42D8B8D420C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m */,
+				42D8B8D620C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.h */,
+				42D8B8D720C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m */,
+				42D8B8B820C2470F001C125F /* CollectionView */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
+		42D8B8B820C2470F001C125F /* CollectionView */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8B920C2486C001C125F /* RADetailActionSubCell.h */,
+				42D8B8BA20C2486C001C125F /* RADetailActionSubCell.m */,
+				42D8B8D020C267C7001C125F /* RADetailActionsLayout.h */,
+				42D8B8D120C267C7001C125F /* RADetailActionsLayout.m */,
+			);
+			path = CollectionView;
+			sourceTree = "<group>";
+		};
+		42D8B8BC20C24A77001C125F /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8CD20C2657D001C125F /* RADetailBaseModel.h */,
+				42D8B8CE20C2657D001C125F /* RADetailBaseModel.m */,
+				42D8B8BD20C24A92001C125F /* RADetailSingleLineModel.h */,
+				42D8B8BE20C24A92001C125F /* RADetailSingleLineModel.m */,
+				42D8B8C020C24AA6001C125F /* RADetailMultLineModel.h */,
+				42D8B8C120C24AA6001C125F /* RADetailMultLineModel.m */,
+				42D8B8C320C24AB4001C125F /* RADetailLocationModel.h */,
+				42D8B8C420C24AB4001C125F /* RADetailLocationModel.m */,
+				42D8B8C620C24B0B001C125F /* RADetailActionCollectionModel.h */,
+				42D8B8C720C24B0B001C125F /* RADetailActionCollectionModel.m */,
+				42D8B8C920C24B11001C125F /* Collection */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		42D8B8C920C24B11001C125F /* Collection */ = {
+			isa = PBXGroup;
+			children = (
+				42D8B8CA20C24B27001C125F /* RADetailActionModel.h */,
+				42D8B8CB20C24B27001C125F /* RADetailActionModel.m */,
+			);
+			path = Collection;
+			sourceTree = "<group>";
+		};
 		71EAA32520B9571B002F003C = {
 			isa = PBXGroup;
 			children = (
@@ -60,15 +447,20 @@
 			isa = PBXGroup;
 			children = (
 				71EAA34720B957D5002F003C /* Apex And Drivers.entitlements */,
+				4205FD4C20C0F50C00DB42B4 /* Alert */,
+				42529D2820C0E9CE000C0F4D /* Utils */,
+				42529D2620C0E98A000C0F4D /* Config */,
+				42529D2220C0E91E000C0F4D /* DataProvider */,
+				42529D1E20C0E8C4000C0F4D /* Network */,
+				4205FD5920C1313F00DB42B4 /* BaseViewController */,
+				4205FD4520C0F33500DB42B4 /* Login */,
+				4205FD5E20C1359C00DB42B4 /* Home */,
+				42D8B8A420C23D69001C125F /* Detail */,
+				42D8B8A520C23D75001C125F /* Update */,
+				42D8B8A120C224EE001C125F /* FakeData */,
 				71EAA33120B9571B002F003C /* AppDelegate.h */,
 				71EAA33220B9571B002F003C /* AppDelegate.m */,
-				71EAA33420B9571B002F003C /* ViewController.h */,
-				71EAA33520B9571B002F003C /* ViewController.m */,
-				71EAA33720B9571B002F003C /* Main.storyboard */,
-				71EAA33A20B95720002F003C /* Assets.xcassets */,
-				71EAA33C20B95720002F003C /* LaunchScreen.storyboard */,
-				71EAA33F20B95720002F003C /* Info.plist */,
-				71EAA34020B95720002F003C /* main.m */,
+				4205FD5D20C134B400DB42B4 /* Other */,
 			);
 			path = "Apex And Drivers";
 			sourceTree = "<group>";
@@ -139,7 +531,13 @@
 			buildActionMask = 2147483647;
 			files = (
 				71EAA33E20B95720002F003C /* LaunchScreen.storyboard in Resources */,
+				42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */,
+				42D8B8E020C28755001C125F /* fake_order_detail.json in Resources */,
 				71EAA33B20B95720002F003C /* Assets.xcassets in Resources */,
+				42D8B8AA20C23DF0001C125F /* Detail.storyboard in Resources */,
+				4280034220C0F146004D4F50 /* LICENSE in Resources */,
+				4205FD6320C136F900DB42B4 /* Home.storyboard in Resources */,
+				4205FD4420C0F2C000DB42B4 /* Login.storyboard in Resources */,
 				71EAA33920B9571B002F003C /* Main.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -151,9 +549,51 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				71EAA33620B9571B002F003C /* ViewController.m in Sources */,
+				4280034520C0F146004D4F50 /* NSString+Base64.m in Sources */,
+				42D8B8BF20C24A92001C125F /* RADetailSingleLineModel.m in Sources */,
+				42D8B8D820C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m in Sources */,
+				42529D3B20C0EA3F000C0F4D /* unzip.c in Sources */,
+				4205FD4B20C0F4C400DB42B4 /* RetrievePasswordViewController.m in Sources */,
+				42529D4320C0EB01000C0F4D /* RANetworkTaskDelegate.m in Sources */,
+				42D8B8DE20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m in Sources */,
+				42529D2B20C0EA0A000C0F4D /* RAUtils.m in Sources */,
+				4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */,
+				42529D2120C0E8EC000C0F4D /* NetworkUtils.m in Sources */,
+				42D8B8CF20C2657D001C125F /* RADetailBaseModel.m in Sources */,
+				4205FD5520C0F50C00DB42B4 /* JLPresentationController.m in Sources */,
+				42529D3D20C0EA3F000C0F4D /* ZipArchive.mm in Sources */,
+				4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */,
+				42D8B8C820C24B0B001C125F /* RADetailActionCollectionModel.m in Sources */,
+				42D8B8DB20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m in Sources */,
+				42D8B8CC20C24B27001C125F /* RADetailActionModel.m in Sources */,
+				4205FD5820C0F6F100DB42B4 /* RAConvertor.m in Sources */,
+				4205FD5320C0F50C00DB42B4 /* JLCustomerAlertController.m in Sources */,
+				4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */,
+				4205FD6120C135CF00DB42B4 /* RAHomeViewController.m in Sources */,
+				4205FD7220C1465400DB42B4 /* RAHomeOrderModel.m in Sources */,
+				42529D3C20C0EA3F000C0F4D /* zip.c in Sources */,
+				42D8B8D220C267C7001C125F /* RADetailActionsLayout.m in Sources */,
+				42D8B8B420C2463D001C125F /* RADetailLocationCell.m in Sources */,
+				42529D3A20C0EA3F000C0F4D /* mztools.c in Sources */,
+				4205FD5C20C1316200DB42B4 /* RABaseViewController.m in Sources */,
+				42D8B8B120C2462D001C125F /* RADetailMultLineCell.m in Sources */,
+				4280034120C0F146004D4F50 /* AESCrypt.m in Sources */,
+				42529D2520C0E97E000C0F4D /* RADataProvider.m in Sources */,
+				42D8B8D520C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m in Sources */,
+				4205FD6C20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m in Sources */,
+				4205FD5420C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m in Sources */,
+				42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */,
+				42D8B8AE20C245D5001C125F /* RADetailSingleLineCell.m in Sources */,
+				42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */,
 				71EAA34120B95720002F003C /* main.m in Sources */,
+				4205FD4820C0F33500DB42B4 /* LoginViewController.m in Sources */,
+				42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */,
 				71EAA33320B9571B002F003C /* AppDelegate.m in Sources */,
+				4205FD6F20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m in Sources */,
+				42D8B8C520C24AB4001C125F /* RADetailLocationModel.m in Sources */,
+				42529D4020C0EA59000C0F4D /* Reachability.m in Sources */,
+				42529D3920C0EA3F000C0F4D /* ioapi.c in Sources */,
+				42D8B8B720C24656001C125F /* RADetailActionsCell.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -296,6 +736,8 @@
 				CODE_SIGN_ENTITLEMENTS = "Apex And Drivers/Apex And Drivers.entitlements";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SRCROOT)/Apex And Drivers/PrefixHeader.pch";
 				INFOPLIST_FILE = "Apex And Drivers/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
@@ -314,6 +756,8 @@
 				CODE_SIGN_ENTITLEMENTS = "Apex And Drivers/Apex And Drivers.entitlements";
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "$(SRCROOT)/Apex And Drivers/PrefixHeader.pch";
 				INFOPLIST_FILE = "Apex And Drivers/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",

+ 32 - 1
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -7,13 +7,37 @@
 //
 #import "AppDelegate.h"
 #import <UserNotifications/UserNotifications.h>
+#import "LoginViewController.h"
+#import "RAHomeViewController.h"
 
 @interface AppDelegate ()<UNUserNotificationCenterDelegate>
+
+@property (nonatomic,weak) UINavigationController *rootVC;
+
 @end
 
 @implementation AppDelegate
+
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     // Override point for customization after application launch.
+    
+    // View
+    
+    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
+    self.window.backgroundColor = [UIColor whiteColor];
+    
+    LoginViewController *rootVC = [LoginViewController viewControllerFromStoryboard];
+    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:rootVC];
+    self.window.rootViewController = nav;
+    
+    __weak typeof(self) weakSelf = self;
+    rootVC.loginSuccessful = ^{
+        
+        [weakSelf showHomeVC];
+    };
+    
+    [self.window makeKeyAndVisible];
+    
     //消息推送注册
     UNUserNotificationCenter * center = [UNUserNotificationCenter currentNotificationCenter];
     [center setDelegate:self];
@@ -30,6 +54,13 @@
     return YES;
 }
 
+- (void)showHomeVC {
+    
+    RAHomeViewController *homeVC = [RAHomeViewController viewControllerFromStoryboard];
+    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:homeVC];
+    self.window.rootViewController = nav;
+}
+
 //完成注册后收到devicetoken
 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     //上传deviceToken给后台服务器
@@ -45,7 +76,7 @@
 - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
     
 }
-- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {
+- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
     NSLog(@"接收到推送内容==%@", response.notification.request.content.userInfo);
 }
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{

+ 17 - 0
Redant Drivers/Apex And Drivers/BaseViewController/RABaseViewController.h

@@ -0,0 +1,17 @@
+//
+//  RABaseViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface RABaseViewController : UIViewController
+
++ (NSString *)storyboardID;
+
++ (instancetype)viewControllerFromStoryboard;
+
+@end

+ 36 - 0
Redant Drivers/Apex And Drivers/BaseViewController/RABaseViewController.m

@@ -0,0 +1,36 @@
+//
+//  RABaseViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+@interface RABaseViewController ()
+
+@end
+
+@implementation RABaseViewController
+
++ (NSString *)storyboardID {
+    return NSStringFromClass([self class]);
+}
+
++ (instancetype)viewControllerFromStoryboard {
+    return nil;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.h

@@ -0,0 +1,16 @@
+//
+//  RADetailActionSubCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailActionModel;
+@interface RADetailActionSubCell : UICollectionViewCell
+
+@property (nonatomic,strong) RADetailActionModel *model;
+
+@end

+ 33 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.m

@@ -0,0 +1,33 @@
+//
+//  RADetailActionSubCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSubCell.h"
+#import "RADetailActionModel.h"
+
+@interface RADetailActionSubCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *actionTitleLabel;
+
+
+@end
+
+@implementation RADetailActionSubCell
+
+- (void)setModel:(RADetailActionModel *)model {
+    _model = model;
+    
+    self.actionTitleLabel.text = model.actionTitle;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+@end

+ 23 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionsLayout.h

@@ -0,0 +1,23 @@
+//
+//  RADetailActionsLayout.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@protocol RADetailActionsLayoutDelegate <NSObject>
+
+@required
+- (NSArray *)prepareLayout;
+- (CGFloat)layoutContentHeight;
+
+@end
+
+@interface RADetailActionsLayout : UICollectionViewLayout
+
+@property (nonatomic,weak) id<RADetailActionsLayoutDelegate> delegate;
+
+@end

+ 66 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionsLayout.m

@@ -0,0 +1,66 @@
+//
+//  RADetailActionsLayout.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsLayout.h"
+
+@implementation RADetailActionsLayout {
+    NSArray *attrs;
+}
+
+- (void)prepareLayout {
+    
+    if (self.delegate) {
+        attrs = [self.delegate prepareLayout];
+    }
+}
+
+- (CGSize)collectionViewContentSize {
+    
+    CGFloat height = 0;
+    if (self.delegate) {
+        height = [self.delegate layoutContentHeight];
+    }
+    return CGSizeMake(self.collectionView.frame.size.width, height);
+}
+
+
+- (NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect {
+    
+    __block NSMutableArray *attrsArr = [NSMutableArray array];
+    [attrs enumerateObjectsUsingBlock:^(UICollectionViewLayoutAttributes *  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+        if (CGRectIntersectsRect(rect, obj.frame)) {
+            [attrsArr addObject:obj];
+        }
+    }];
+    
+    return attrsArr;
+}
+
+- (UICollectionViewLayoutAttributes *)layoutAttributesForDecorationViewOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath {
+    return nil;
+}
+
+- (UICollectionViewLayoutAttributes *)layoutAttributesForSupplementaryViewOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath {
+    return nil;
+}
+
+- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
+    UICollectionViewLayoutAttributes *itemtAttrs = [self->attrs objectAtIndex:indexPath.row];
+    return itemtAttrs;
+}
+
+- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds {
+    CGRect oldBounds = self.collectionView.bounds;
+    if (!CGSizeEqualToSize(newBounds.size, oldBounds.size)) {
+        return YES;
+    }
+    return NO;
+}
+
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.h

@@ -0,0 +1,13 @@
+//
+//  RADetailActionsCell+CollectionViewDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsCell.h"
+
+@interface RADetailActionsCell (CollectionViewDataSource) <UICollectionViewDataSource>
+
+@end

+ 30 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.m

@@ -0,0 +1,30 @@
+//
+//  RADetailActionsCell+CollectionViewDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsCell+CollectionViewDataSource.h"
+#import "RADetailActionModel.h"
+#import "RADetailActionSubCell.h"
+
+@implementation RADetailActionsCell (CollectionViewDataSource)
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    return [self actionNumberForSection:section];
+}
+
+- (nonnull __kindof UICollectionViewCell *)collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    
+    RADetailActionSubCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"RADetailActionSubCell" forIndexPath:indexPath];
+    
+    RADetailActionModel *model = [self actionModelForIndexPath:indexPath];
+    cell.model = model;
+    
+    return cell;
+}
+
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RADetailActionsCell+CollectionViewDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsCell.h"
+
+@interface RADetailActionsCell (CollectionViewDelegate) <UICollectionViewDelegate>
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDelegate.m

@@ -0,0 +1,13 @@
+//
+//  RADetailActionsCell+CollectionViewDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsCell+CollectionViewDelegate.h"
+
+@implementation RADetailActionsCell (CollectionViewDelegate)
+
+@end

+ 20 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.h

@@ -0,0 +1,20 @@
+//
+//  RADetailActionsCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailActionCollectionModel,RADetailActionModel,RADetailActionsLayout;
+@interface RADetailActionsCell : UITableViewCell
+
+@property (nonatomic,strong) RADetailActionCollectionModel *model;
+@property (nonatomic,weak,readonly) RADetailActionsLayout *actionLayout;
+
+- (NSInteger)actionNumberForSection:(NSInteger)section;
+- (RADetailActionModel *)actionModelForIndexPath:(NSIndexPath *)indexPath;
+
+@end

+ 65 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.m

@@ -0,0 +1,65 @@
+//
+//  RADetailActionsCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionsCell.h"
+#import "RADetailActionCollectionModel.h"
+#import "RADetailActionsLayout.h"
+#import "RADetailActionModel.h"
+#import "RADetailActionsLayout.h"
+
+@interface RADetailActionsCell () {
+    RADetailActionsLayout *_layout;
+}
+
+@property (strong, nonatomic) IBOutlet UICollectionView *actionCollectionView;
+
+
+@end
+
+@implementation RADetailActionsCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    _layout = [[RADetailActionsLayout alloc] init];
+    self.actionCollectionView.collectionViewLayout = _layout;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setModel:(RADetailActionCollectionModel *)model {
+    _model = model;
+    [self.actionCollectionView reloadData];
+}
+
+#pragma mark - Getter
+
+- (NSInteger)actionNumberForSection:(NSInteger)section {
+    return self.model.actionCount;
+}
+
+- (RADetailActionModel *)actionModelForIndexPath:(NSIndexPath *)indexPath {
+    return [self.model actionModelForIndexPath:indexPath];
+}
+
+- (RADetailActionsLayout *)actionLayout {
+    return _layout;
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.h

@@ -0,0 +1,16 @@
+//
+//  RADetailLocationCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailLocationModel;
+@interface RADetailLocationCell : UITableViewCell
+
+@property (nonatomic,strong) RADetailLocationModel *model;
+
+@end

+ 56 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m

@@ -0,0 +1,56 @@
+//
+//  RADetailLocationCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailLocationCell.h"
+#import "RADetailLocationModel.h"
+//#import <MapKit/MapKit.h>
+
+@interface RADetailLocationCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
+@property (strong, nonatomic) IBOutlet UIButton *navigationBtn;
+@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+
+
+@end
+
+
+@implementation RADetailLocationCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setModel:(RADetailLocationModel *)model {
+    _model = model;
+    
+    self.titleLabel.text = _model.title;
+    self.valueLabel.text = _model.location;
+}
+
+#pragma mark - User Action
+
+- (IBAction)navigationBtnClick:(UIButton *)sender {
+    
+}
+
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.h

@@ -0,0 +1,16 @@
+//
+//  RADetailMultLineCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailMultLineModel;
+@interface RADetailMultLineCell : UITableViewCell
+
+@property (nonatomic,strong) RADetailMultLineModel *model;
+
+@end

+ 44 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.m

@@ -0,0 +1,44 @@
+//
+//  RADetailMultLineCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailMultLineCell.h"
+#import "RADetailMultLineModel.h"
+
+@interface RADetailMultLineCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+
+
+@end
+
+@implementation RADetailMultLineCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setModel:(RADetailMultLineModel *)model {
+    _model = model;
+    
+    self.valueLabel.text = _model.value;
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.h

@@ -0,0 +1,16 @@
+//
+//  RADetailSingleLineCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailSingleLineModel;
+@interface RADetailSingleLineCell : UITableViewCell
+
+@property (nonatomic,strong) RADetailSingleLineModel *model;
+
+@end

+ 46 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.m

@@ -0,0 +1,46 @@
+//
+//  RADetailSingleLineCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailSingleLineCell.h"
+#import "RADetailSingleLineModel.h"
+
+@interface RADetailSingleLineCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLable;
+@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+
+
+@end
+
+@implementation RADetailSingleLineCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setModel:(RADetailSingleLineModel *)model {
+    _model = model;
+    
+    self.titleLable.text = _model.title;
+    self.valueLabel.text = _model.value;
+}
+
+@end

+ 233 - 0
Redant Drivers/Apex And Drivers/Detail/Detail.storyboard

@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Order Detail-->
+        <scene sceneID="GQu-MF-w2X">
+            <objects>
+                <viewController storyboardIdentifier="RAOrderDetailViewController" title="Order Detail" useStoryboardIdentifierAsRestorationIdentifier="YES" id="wYu-98-b8c" customClass="RAOrderDetailViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="ddK-ne-BxC">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Xxs-Bp-xwk">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailSingleLineCell" rowHeight="70" id="PRr-DR-Xqo" customClass="RADetailSingleLineCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="70"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PRr-DR-Xqo" id="HGR-qE-k8g">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="69.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IcX-EB-asg">
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="21" id="yUK-tS-gzP"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20180530001200" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L7s-6m-7Rs">
+                                                    <rect key="frame" x="5" y="27" width="365" height="37.5"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="IcX-EB-asg" firstAttribute="top" secondItem="HGR-qE-k8g" secondAttribute="top" constant="5" id="JTx-I2-fau"/>
+                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="leading" secondItem="IcX-EB-asg" secondAttribute="leading" id="RFT-Jc-9je"/>
+                                                <constraint firstItem="IcX-EB-asg" firstAttribute="leading" secondItem="HGR-qE-k8g" secondAttribute="leading" constant="5" id="ceh-Sw-2hB"/>
+                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="top" secondItem="IcX-EB-asg" secondAttribute="bottom" constant="1" id="n6f-Ba-NC2"/>
+                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="trailing" secondItem="IcX-EB-asg" secondAttribute="trailing" id="o0G-gr-RAA"/>
+                                                <constraint firstAttribute="trailing" secondItem="IcX-EB-asg" secondAttribute="trailing" constant="5" id="uYy-kz-oiJ"/>
+                                                <constraint firstAttribute="bottom" secondItem="L7s-6m-7Rs" secondAttribute="bottom" constant="5" id="zwI-Qi-tnt"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="titleLable" destination="IcX-EB-asg" id="p20-UP-YZv"/>
+                                            <outlet property="valueLabel" destination="L7s-6m-7Rs" id="c0Y-7M-8Vt"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailMultLineCell" rowHeight="90" id="hLY-jO-rx0" customClass="RADetailMultLineCell">
+                                        <rect key="frame" x="0.0" y="98" width="375" height="90"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hLY-jO-rx0" id="xPv-W6-2E0">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="89.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nxW-Ig-F5h">
+                                                    <rect key="frame" x="5" y="5" width="365" height="79.5"/>
+                                                    <string key="text">DEMURRAGE LFD
+TERMINAL PICKUP APPT
+DELIVERY  APPT(setup wiwhse)
+PICKUP ON</string>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstAttribute="bottom" secondItem="nxW-Ig-F5h" secondAttribute="bottom" constant="5" id="GyO-p5-EVV"/>
+                                                <constraint firstAttribute="trailing" secondItem="nxW-Ig-F5h" secondAttribute="trailing" constant="5" id="LvG-rE-wMJ"/>
+                                                <constraint firstItem="nxW-Ig-F5h" firstAttribute="top" secondItem="xPv-W6-2E0" secondAttribute="top" constant="5" id="jxJ-Pf-0Pr"/>
+                                                <constraint firstItem="nxW-Ig-F5h" firstAttribute="leading" secondItem="xPv-W6-2E0" secondAttribute="leading" constant="5" id="u8Z-wy-aFV"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="valueLabel" destination="nxW-Ig-F5h" id="yM0-iy-Epm"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailLocationCell" rowHeight="100" id="2RY-c8-4kR" customClass="RADetailLocationCell">
+                                        <rect key="frame" x="0.0" y="188" width="375" height="100"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2RY-c8-4kR" id="8uQ-ij-SSa">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ECt-q4-gbV">
+                                                    <rect key="frame" x="5" y="31" width="260" height="63.5"/>
+                                                    <string key="text">TRANS PACIFIC CONTAINER SERVICE
+BERTH 30 2800 7TH ST
+OAKLAND,CA</string>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E85-g7-fwi">
+                                                    <rect key="frame" x="297" y="48" width="73" height="30"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="30" id="Bt5-LJ-HeT"/>
+                                                        <constraint firstAttribute="width" constant="73" id="vza-Ko-Kz7"/>
+                                                    </constraints>
+                                                    <state key="normal" title="Navigation"/>
+                                                    <connections>
+                                                        <action selector="navigationBtnClick:" destination="2RY-c8-4kR" eventType="touchUpInside" id="Uh4-L7-HQA"/>
+                                                    </connections>
+                                                </button>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="off-5x-hpV">
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="21" id="Pn5-ru-O79"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="ECt-q4-gbV" firstAttribute="leading" secondItem="8uQ-ij-SSa" secondAttribute="leading" constant="5" id="17n-XI-PAS"/>
+                                                <constraint firstItem="off-5x-hpV" firstAttribute="leading" secondItem="8uQ-ij-SSa" secondAttribute="leading" constant="5" id="BQI-Ha-9lP"/>
+                                                <constraint firstAttribute="bottom" secondItem="ECt-q4-gbV" secondAttribute="bottom" constant="5" id="C2P-AA-Ri7"/>
+                                                <constraint firstItem="off-5x-hpV" firstAttribute="top" secondItem="8uQ-ij-SSa" secondAttribute="top" constant="5" id="K6e-CH-Pjd"/>
+                                                <constraint firstItem="ECt-q4-gbV" firstAttribute="top" secondItem="off-5x-hpV" secondAttribute="bottom" constant="5" id="cna-9u-WJh"/>
+                                                <constraint firstAttribute="trailing" secondItem="E85-g7-fwi" secondAttribute="trailing" constant="5" id="lQq-bo-Keq"/>
+                                                <constraint firstItem="E85-g7-fwi" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="ECt-q4-gbV" secondAttribute="trailing" constant="5" id="w7k-4C-7bW"/>
+                                                <constraint firstItem="E85-g7-fwi" firstAttribute="centerY" secondItem="ECt-q4-gbV" secondAttribute="centerY" id="wLX-D8-Sto"/>
+                                                <constraint firstAttribute="trailing" secondItem="off-5x-hpV" secondAttribute="trailing" constant="5" id="zj7-JY-cEr"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="navigationBtn" destination="E85-g7-fwi" id="ADi-0u-fQp"/>
+                                            <outlet property="titleLabel" destination="off-5x-hpV" id="ciX-Sg-fpd"/>
+                                            <outlet property="valueLabel" destination="ECt-q4-gbV" id="1EL-lB-2tL"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionsCell" rowHeight="100" id="22c-X4-T1m" customClass="RADetailActionsCell">
+                                        <rect key="frame" x="0.0" y="288" width="375" height="100"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="22c-X4-T1m" id="f99-Y7-BOd">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="iKo-LB-QEE">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="p8G-wr-zEn">
+                                                        <size key="itemSize" width="224" height="50"/>
+                                                        <size key="headerReferenceSize" width="0.0" height="0.0"/>
+                                                        <size key="footerReferenceSize" width="0.0" height="0.0"/>
+                                                        <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    </collectionViewFlowLayout>
+                                                    <cells>
+                                                        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="RADetailActionSubCell" id="NRo-Hn-zDX" customClass="RADetailActionSubCell">
+                                                            <rect key="frame" x="75.5" y="0.0" width="224" height="50"/>
+                                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
+                                                                <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
+                                                                <autoresizingMask key="autoresizingMask"/>
+                                                                <subviews>
+                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Action" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UyU-YA-BgD">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
+                                                                        <color key="backgroundColor" red="0.64783424140000001" green="0.22448275840000001" blue="0.21907054149999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                        <nil key="textColor"/>
+                                                                        <nil key="highlightedColor"/>
+                                                                    </label>
+                                                                </subviews>
+                                                            </view>
+                                                            <constraints>
+                                                                <constraint firstItem="UyU-YA-BgD" firstAttribute="leading" secondItem="NRo-Hn-zDX" secondAttribute="leading" id="9LK-aO-4yB"/>
+                                                                <constraint firstAttribute="bottom" secondItem="UyU-YA-BgD" secondAttribute="bottom" id="NmW-Al-o3u"/>
+                                                                <constraint firstAttribute="trailing" secondItem="UyU-YA-BgD" secondAttribute="trailing" id="SPX-5C-FB0"/>
+                                                                <constraint firstItem="UyU-YA-BgD" firstAttribute="top" secondItem="NRo-Hn-zDX" secondAttribute="top" id="hqg-xe-row"/>
+                                                            </constraints>
+                                                            <connections>
+                                                                <outlet property="actionTitleLabel" destination="UyU-YA-BgD" id="NYw-fR-lZU"/>
+                                                            </connections>
+                                                        </collectionViewCell>
+                                                    </cells>
+                                                    <connections>
+                                                        <outlet property="dataSource" destination="22c-X4-T1m" id="sya-lI-Xqo"/>
+                                                        <outlet property="delegate" destination="22c-X4-T1m" id="B2S-RW-PP3"/>
+                                                    </connections>
+                                                </collectionView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstAttribute="bottom" secondItem="iKo-LB-QEE" secondAttribute="bottom" id="fht-3O-LDV"/>
+                                                <constraint firstAttribute="trailing" secondItem="iKo-LB-QEE" secondAttribute="trailing" id="kHn-fC-cSH"/>
+                                                <constraint firstItem="iKo-LB-QEE" firstAttribute="top" secondItem="f99-Y7-BOd" secondAttribute="top" id="uHJ-mz-uft"/>
+                                                <constraint firstItem="iKo-LB-QEE" firstAttribute="leading" secondItem="f99-Y7-BOd" secondAttribute="leading" id="yXR-wF-Lfi"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="actionCollectionView" destination="iKo-LB-QEE" id="XWC-qN-Lrx"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="wYu-98-b8c" id="ddq-cb-RtK"/>
+                                    <outlet property="delegate" destination="wYu-98-b8c" id="enZ-Z1-wuK"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="Xxs-Bp-xwk" firstAttribute="trailing" secondItem="hEy-k0-tf5" secondAttribute="trailing" id="12Y-9k-qJd"/>
+                            <constraint firstItem="Xxs-Bp-xwk" firstAttribute="leading" secondItem="hEy-k0-tf5" secondAttribute="leading" id="2HP-SI-29U"/>
+                            <constraint firstItem="Xxs-Bp-xwk" firstAttribute="bottom" secondItem="hEy-k0-tf5" secondAttribute="bottom" id="94I-Aq-Rvf"/>
+                            <constraint firstItem="Xxs-Bp-xwk" firstAttribute="top" secondItem="hEy-k0-tf5" secondAttribute="top" id="o3j-YT-2Th"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="hEy-k0-tf5"/>
+                    </view>
+                    <connections>
+                        <outlet property="detailTableView" destination="Xxs-Bp-xwk" id="YEe-3u-DEQ"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="WUS-ba-oxC" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-274.39999999999998" y="9.4452773613193415"/>
+        </scene>
+    </scenes>
+</document>

+ 21 - 0
Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.h

@@ -0,0 +1,21 @@
+//
+//  RADetailActionModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+typedef enum {
+    RADetailActionTypeRemote = 0,
+    RADetailActionTypeLocal = 1
+} RADetailActionType;
+
+@interface RADetailActionModel : NSObject
+
+@property (nonatomic,assign) RADetailActionType actionType;
+@property (nonatomic,copy) NSString *actionTitle;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.m

@@ -0,0 +1,17 @@
+//
+//  RADetailActionModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionModel.h"
+
+@implementation RADetailActionModel
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+@end

+ 24 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.h

@@ -0,0 +1,24 @@
+//
+//  RADetailActionCollectionModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+#import "RADetailActionsLayout.h"
+
+@class RADetailActionsLayout,RADetailActionModel;
+
+@interface RADetailActionCollectionModel : RADetailBaseModel <RADetailActionsLayoutDelegate>
+
+@property (nonatomic,strong) NSArray <RADetailActionModel *> *actions;
+@property (nonatomic,strong,readonly) RADetailActionsLayout *layout;
+@property (nonatomic,assign,readonly) NSInteger actionCount;
+
+
+- (RADetailActionModel *)actionModelForIndexPath:(NSIndexPath *)indexPath;
+
+
+@end

+ 115 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.m

@@ -0,0 +1,115 @@
+//
+//  RADetailActionCollectionModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionCollectionModel.h"
+#import "RADetailActionModel.h"
+
+@interface RADetailActionCollectionModel () 
+
+@property (nonatomic,assign) CGFloat itemSpacing;
+@property (nonatomic,assign) CGFloat itemHeight;
+@property (nonatomic,assign) NSInteger numberOfColumns;
+@property (nonatomic,assign) NSInteger itemCount;
+
+@property (nonatomic,assign) CGFloat collectionViewWidth;
+@property (nonatomic,assign) CGFloat contentHeight;
+@property (nonatomic,strong) NSArray *layoutAttrs;
+
+@end
+
+@implementation RADetailActionCollectionModel 
+
+- (instancetype)init {
+    if (self = [super init]) {
+        
+        _itemSpacing = 10.0f;
+        _itemHeight = 30.0f;
+        _numberOfColumns = 2;
+        
+    }
+    return self;
+}
+
+- (void)setActions:(NSArray *)actions {
+    
+    NSMutableArray *modelArr = [NSMutableArray array];
+    for (int i = 0; i < actions.count; i++) {
+        NSDictionary *action = [actions objectAtIndex:i];
+        RADetailActionModel *model = [[RADetailActionModel alloc] init];
+        [model setValuesForKeysWithDictionary:action];
+        [modelArr addObject:model];
+    }
+    
+    _actions = modelArr;
+    self.itemCount = _actions.count;
+    self.layoutAttrs = nil;
+    
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self prepareLayout];
+    });
+}
+
+- (NSInteger)actionCount {
+    return self.actions.count;
+}
+
+- (RADetailActionModel *)actionModelForIndexPath:(NSIndexPath *)indexPath {
+    return [self.actions objectAtIndex:indexPath.item];
+}
+
+- (CGFloat)height {
+    if (self.contentHeight <= 0) {
+        [self prepareLayout];
+    }
+    return self.contentHeight;
+}
+
+- (NSArray *)prepareLayout {
+    
+    if (self.layoutAttrs) {
+        return self.layoutAttrs;
+    }
+    
+    self.collectionViewWidth = self.width;
+    
+    NSUInteger numberOfItem = self.itemCount;
+    NSMutableArray *attrsArr = [NSMutableArray arrayWithCapacity:numberOfItem];
+    
+    CGFloat itemWidth = (self.collectionViewWidth - self.itemSpacing * (self.numberOfColumns + 1)) / self.numberOfColumns;
+    for (int i = 0; i < numberOfItem; i++) {
+        
+        int col = i % self.numberOfColumns;
+        int row = i / self.numberOfColumns;
+        
+        CGFloat x = self.itemSpacing + (itemWidth + self.itemSpacing) * col;
+        CGFloat y = self.itemSpacing + (self.itemHeight + self.itemSpacing) * row;
+        
+        
+        if (i == numberOfItem - 1 && col == 0) {
+            itemWidth = self.collectionViewWidth - self.itemSpacing * 2;
+        }
+        CGRect frame = CGRectMake(x, y, itemWidth, self.itemHeight);
+        
+        NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:0];
+        UICollectionViewLayoutAttributes *itemAttrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
+        itemAttrs.frame = frame;
+        [attrsArr addObject:itemAttrs];
+        
+        self.contentHeight = CGRectGetMaxY(frame);
+    }
+    self.layoutAttrs = attrsArr;
+    self.contentHeight += self.itemSpacing;
+    
+    return self.layoutAttrs;
+}
+
+- (CGFloat)layoutContentHeight {
+    return self.contentHeight;
+}
+
+@end

+ 24 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.h

@@ -0,0 +1,24 @@
+//
+//  RADetailBaseModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef enum {
+    RAOrderDetailValueTypeSingleLine = 0,
+    RAOrderDetailValueTypeMultipleLine = 1,
+    RAOrderDetailValueTypeAction = 2,
+    RAOrderDetailValueTypeLocation = 3
+} RAOrderDetailValueType;
+
+@interface RADetailBaseModel : NSObject
+
+@property (nonatomic,assign) RAOrderDetailValueType type;
+@property (nonatomic,assign) CGFloat width; ///< tableView Width, if smaller than 0 then use screen width
+@property (nonatomic,readonly,assign) CGFloat height;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.m

@@ -0,0 +1,17 @@
+//
+//  RADetailBaseModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+
+@implementation RADetailBaseModel
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.h

@@ -0,0 +1,16 @@
+//
+//  RADetailLocationModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+
+@interface RADetailLocationModel : RADetailBaseModel
+
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,copy) NSString *location;
+
+@end

+ 56 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.m

@@ -0,0 +1,56 @@
+//
+//  RADetailLocationModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailLocationModel.h"
+
+static const CGFloat SpaceWidth = 90.0f;
+static const CGFloat SpaceHeight = 38.0f;
+
+@implementation RADetailLocationModel {
+    CGFloat _height;
+}
+
+- (void)setLocation:(NSString *)location {
+    _location = location;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self caculateValueHeight];
+    });
+}
+
+- (CGFloat)height {
+    if (_height <= 0) {
+        [self caculateValueHeight];
+    }
+    return _height;
+}
+
+- (void)caculateValueHeight {
+    if (self.location.length == 0) {
+        return;
+    }
+    CGFloat w = self.width;
+    if (w <= 0) {
+        w = CGRectGetWidth([UIScreen mainScreen].bounds);
+    }
+    
+    CGFloat h = [self.location boundingRectWithSize:CGSizeMake(w - SpaceWidth, FLT_MAX)
+                                         options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
+                                      attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]}
+                                         context:nil].size.height;
+    CGFloat navBtnHeight = 30.0f;
+    if (h < navBtnHeight) { // navigation button height
+        h = navBtnHeight;
+    }
+    
+    _height = h + SpaceHeight;
+    if (_height < 100.0f) {
+        _height = 100.0f;
+    }
+}
+
+@end

+ 15 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultLineModel.h

@@ -0,0 +1,15 @@
+//
+//  RADetailMultLineModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+
+@interface RADetailMultLineModel : RADetailBaseModel
+
+@property (nonatomic,copy) NSString *value;
+
+@end

+ 51 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultLineModel.m

@@ -0,0 +1,51 @@
+//
+//  RADetailMultLineModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailMultLineModel.h"
+
+static const CGFloat SpaceWidth = 10.0f;
+static const CGFloat SpaceHeight = 12.0f;
+
+@implementation RADetailMultLineModel {
+    CGFloat _height;
+}
+
+- (void)setValue:(NSString *)value {
+    _value = value;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self caculateValueHeight];
+    });
+}
+
+- (CGFloat)height {
+    if (_height <= 0) {
+        [self caculateValueHeight];
+    }
+    return _height;
+}
+
+- (void)caculateValueHeight {
+    if (self.value.length == 0) {
+        return;
+    }
+    CGFloat w = self.width;
+    if (w <= 0) {
+        w = CGRectGetWidth([UIScreen mainScreen].bounds);
+    }
+    
+    CGFloat h = [self.value boundingRectWithSize:CGSizeMake(w - SpaceWidth, FLT_MAX)
+                                         options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
+                                      attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]}
+                                         context:nil].size.height;
+    _height = h + SpaceHeight;
+    if (_height < 90) {
+        _height = 90.0f;
+    }
+}
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailSingleLineModel.h

@@ -0,0 +1,17 @@
+//
+//  RADetailSingleLineModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+
+@interface RADetailSingleLineModel : RADetailBaseModel
+
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,copy) NSString *value;
+
+
+@end

+ 50 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailSingleLineModel.m

@@ -0,0 +1,50 @@
+//
+//  RADetailSingleLineModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailSingleLineModel.h"
+
+static const CGFloat SpaceWidth = 10.0f;
+static const CGFloat SpaceHeight = 38.0f;
+
+@implementation RADetailSingleLineModel {
+    CGFloat _height;
+}
+
+- (void)setValue:(NSString *)value {
+    _value = value;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self caculateValueHeight];
+    });
+}
+
+- (CGFloat)height {
+    if (_height <= 0) {
+        [self caculateValueHeight];
+    }
+    return _height;
+}
+
+- (void)caculateValueHeight {
+    
+    CGFloat w = self.width;
+    if (w <= 0) {
+        w = CGRectGetWidth([UIScreen mainScreen].bounds);
+    }
+    
+    CGFloat h = [self.value boundingRectWithSize:CGSizeMake(w - SpaceWidth, FLT_MAX)
+                                         options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
+                                      attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]}
+                                         context:nil].size.height;
+    
+    _height = h + SpaceHeight;
+    if (_height < 70.0f) {
+        _height = 70.0f;
+    }
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.h

@@ -0,0 +1,13 @@
+//
+//  RAOrderDetailViewController+TableViewDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderDetailViewController.h"
+
+@interface RAOrderDetailViewController (TableViewDataSource) <UITableViewDataSource>
+
+@end

+ 76 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m

@@ -0,0 +1,76 @@
+//
+//  RAOrderDetailViewController+TableViewDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderDetailViewController+TableViewDataSource.h"
+
+#import "RADetailBaseModel.h"
+#import "RADetailSingleLineModel.h"
+#import "RADetailMultLineModel.h"
+#import "RADetailLocationModel.h"
+#import "RADetailActionCollectionModel.h"
+
+#import "RADetailSingleLineCell.h"
+#import "RADetailMultLineCell.h"
+#import "RADetailActionsCell.h"
+#import "RADetailLocationCell.h"
+
+
+@implementation RAOrderDetailViewController (TableViewDataSource)
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    
+    RADetailBaseModel *model = [self modelForIndexPath:indexPath];
+    RAOrderDetailValueType type = model.type;
+    switch (type) {
+        case RAOrderDetailValueTypeSingleLine: {
+            RADetailSingleLineModel *singleModel = (RADetailSingleLineModel *)model;
+            RADetailSingleLineCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailSingleLineCell" forIndexPath:indexPath];
+            [cell setModel:singleModel];
+            return cell;
+        }
+            break;
+        case RAOrderDetailValueTypeMultipleLine: {
+            RADetailMultLineModel *multModel = (RADetailMultLineModel *)model;
+            RADetailMultLineCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailMultLineCell" forIndexPath:indexPath];
+            [cell setModel:multModel];
+            return cell;
+        }
+            break;
+        case RAOrderDetailValueTypeAction: {
+            RADetailActionCollectionModel *actionModel = (RADetailActionCollectionModel *)model;
+            RADetailActionsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailActionsCell" forIndexPath:indexPath];
+            cell.actionLayout.delegate = actionModel;
+            [cell setModel:actionModel];
+            return cell;
+        }
+            break;
+        case RAOrderDetailValueTypeLocation: {
+            RADetailLocationModel *locationModel = (RADetailLocationModel *)model;
+            RADetailLocationCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailLocationCell" forIndexPath:indexPath];
+            [cell setModel:locationModel];
+            return cell;
+        }
+            break;
+            
+        default:
+            break;
+    }
+    
+    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"detaulCell"];
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self numberOfItemForSection:section];
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return [self sectionNumber];
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RAOrderDetailViewController+TableViewDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderDetailViewController.h"
+
+@interface RAOrderDetailViewController (TableViewDelegate) <UITableViewDelegate>
+
+@end

+ 40 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDelegate.m

@@ -0,0 +1,40 @@
+//
+//  RAOrderDetailViewController+TableViewDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderDetailViewController+TableViewDelegate.h"
+#import "RADetailBaseModel.h"
+#import "RADetailSingleLineModel.h"
+#import "RADetailMultLineModel.h"
+#import "RADetailLocationModel.h"
+#import "RADetailActionCollectionModel.h"
+
+@implementation RAOrderDetailViewController (TableViewDelegate)
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RADetailBaseModel *model = [self modelForIndexPath:indexPath];
+    
+    return model.height;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 44.0f;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+    
+    UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 44.0f)];
+    header.backgroundColor = [UIColor lightGrayColor];
+    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 11, CGRectGetWidth(tableView.bounds) - 20, 22)];
+    [header addSubview:label];
+    
+    label.text = [self titleForSection:section];
+    
+    return header;
+}
+
+@end

+ 21 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.h

@@ -0,0 +1,21 @@
+//
+//  RAOrderDetailViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+@class RADetailBaseModel;
+@interface RAOrderDetailViewController : RABaseViewController
+
+@property (nonatomic,copy) NSString *orderID;
+
+- (NSInteger)sectionNumber;
+- (NSString *)titleForSection:(NSInteger)section;
+- (NSInteger)numberOfItemForSection:(NSInteger)section;
+- (RADetailBaseModel *)modelForIndexPath:(NSIndexPath *)indexPath;
+
+@end

+ 200 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m

@@ -0,0 +1,200 @@
+//
+//  RAOrderDetailViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/2.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderDetailViewController.h"
+#import "RADetailBaseModel.h"
+#import "RADetailSingleLineModel.h"
+#import "RADetailMultLineModel.h"
+#import "RADetailLocationModel.h"
+#import "RADetailActionCollectionModel.h"
+
+@interface RAOrderDetailSectionModel : NSObject
+
+@property (nonatomic,strong) NSArray <RADetailBaseModel *> *values;
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,assign) CGFloat tableWidth;
+
+- (NSInteger)itemCount;
+
+@end
+
+@implementation RAOrderDetailSectionModel
+
+- (instancetype)initWithTableViewWidth:(CGFloat)width {
+    if (self = [super init]) {
+        self.tableWidth = width;
+    }
+    return self;
+}
+
+- (void)setValues:(NSArray *)values {
+    
+    NSMutableArray *modelArr = [NSMutableArray array];
+    for (int i = 0; i < values.count; i++) {
+        NSDictionary *value = [values objectAtIndex:i];
+        RAOrderDetailValueType type = [[value objectForKey:@"type"] intValue];
+        switch (type) {
+            case RAOrderDetailValueTypeSingleLine: {
+                RADetailSingleLineModel *model = [[RADetailSingleLineModel alloc] init];
+                [model setValuesForKeysWithDictionary:value];
+                model.width = self.tableWidth;
+                [modelArr addObject:model];
+            }
+                break;
+            case RAOrderDetailValueTypeMultipleLine: {
+                RADetailMultLineModel *model = [[RADetailMultLineModel alloc] init];
+                [model setValuesForKeysWithDictionary:value];
+                model.width = self.tableWidth;
+                [modelArr addObject:model];
+            }
+                break;
+            case RAOrderDetailValueTypeAction: {
+                RADetailActionCollectionModel *model = [[RADetailActionCollectionModel alloc] init];
+                [model setValuesForKeysWithDictionary:value];
+                model.width = self.tableWidth;
+                [modelArr addObject:model];
+            }
+                break;
+            case RAOrderDetailValueTypeLocation: {
+                RADetailLocationModel *model = [[RADetailLocationModel alloc] init];
+                [model setValuesForKeysWithDictionary:value];
+                model.width = self.tableWidth;
+                [modelArr addObject:model];
+            }
+                break;
+                
+            default:
+                break;
+        }
+    }
+    _values = modelArr;
+}
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+- (NSInteger)itemCount {
+    return self.values.count;
+}
+
+- (RADetailBaseModel *)modelForIndex:(NSInteger)index {
+    return [self.values objectAtIndex:index];
+}
+
+@end
+
+#pragma mark - View Controller
+
+@interface RAOrderDetailViewController ()
+
+@property (strong, nonatomic) IBOutlet UITableView *detailTableView;
+@property (nonatomic,strong) NSMutableArray <RAOrderDetailSectionModel *> *sectionArray;
+
+@end
+
+@implementation RAOrderDetailViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    RAOrderDetailViewController *detailVC = [[UIStoryboard storyboardWithName:@"Detail" bundle:nil] instantiateViewControllerWithIdentifier:[self storyboardID]];
+    return detailVC;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self configureTable];
+    [self loadData];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)configureTable {
+    
+    self.detailTableView.tableFooterView = [UIView new];
+    self.detailTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
+}
+
+#pragma mark - Data
+
+- (void)loadData {
+    
+    // show progress
+    
+    __weak typeof(self) weakSelf = self;
+    
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        
+        NSDictionary *json = [RADataProvider requestOrderDetail:self.orderID];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            
+            // dismiss progress
+            
+            if (weakSelf) {
+                __strong typeof(weakSelf) strongSelf = weakSelf;
+                
+                int result = [[json objectForKey:@"result"] intValue];
+                if (result == RESULT_TRUE) {
+                    
+                    NSArray *sectionArray = [json objectForKey:@"sections"];
+                    [strongSelf.sectionArray removeAllObjects];
+                    CGFloat width = CGRectGetWidth(strongSelf.detailTableView.bounds);
+                    for (int i = 0; i < sectionArray.count; i++) {
+                        NSDictionary *section = [sectionArray objectAtIndex:i];
+                        RAOrderDetailSectionModel *sectionModel = [[RAOrderDetailSectionModel alloc] initWithTableViewWidth:width];
+                        [sectionModel setValuesForKeysWithDictionary:section];
+                        [strongSelf.sectionArray addObject:sectionModel];
+                    }
+                    
+                    [strongSelf.detailTableView reloadData];
+                    
+                } else {
+                    // process error
+                    
+                }
+            }
+            
+        });
+        
+    });
+}
+
+#pragma mark - Getter
+
+- (NSMutableArray *)sectionArray {
+    if (!_sectionArray) {
+        _sectionArray = [NSMutableArray array];
+    }
+    return _sectionArray;
+}
+
+- (NSInteger)sectionNumber {
+    return self.sectionArray.count;
+}
+
+- (NSInteger)numberOfItemForSection:(NSInteger)section {
+    RAOrderDetailSectionModel *model = [[self sectionArray] objectAtIndex:section];
+    return [model itemCount];
+}
+
+- (RADetailBaseModel *)modelForIndexPath:(NSIndexPath *)indexPath {
+    RAOrderDetailSectionModel *model = [[self sectionArray] objectAtIndex:indexPath.section];
+    return [model modelForIndex:indexPath.row];
+}
+
+- (NSString *)titleForSection:(NSInteger)section {
+    RAOrderDetailSectionModel *model = [[self sectionArray] objectAtIndex:section];
+    return model.title;
+}
+
+@end

+ 186 - 0
Redant Drivers/Apex And Drivers/FakeData/fake_order_detail.json

@@ -0,0 +1,186 @@
+{
+    "result": 2,
+    "sections": [
+                 {
+                 "title": "Overview",
+                 "values": [
+                            {
+                            "title": "Order ID",
+                            "value": "201805300010",
+                            "type": 0
+                            },
+                            {
+                            "title": "Dispatcher",
+                            "value": "Jack",
+                            "type": 0
+                            },
+                            {
+                            "title": "Container No.",
+                            "value": "TCNU6432476",
+                            "type": 0
+                            },
+                            {
+                            "title": "Type",
+                            "value": "Pickup Order Import",
+                            "type": 0
+                            },
+                            {
+                            "title": "Status",
+                            "value": "C2-Delivered Empty",
+                            "type": 0
+                            },
+                            {
+                            "title": "Action",
+                            "value": "Delivered",
+                            "type": 0
+                            },
+                            {
+                            "title": "Instuctions",
+                            "value": "据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。",
+                            "type": 0
+                            }
+                            ]
+                 },
+                 {
+                 "title": "Action",
+                 "values": [
+                            {
+                            "actions": [
+                                        {
+                                        "actionType": "0",
+                                        "actionTitle": "Reject"
+                                        },
+                                        {
+                                        "actionType": "0",
+                                        "actionTitle": "Reject"
+                                        },
+                                        {
+                                        "actionType": "0",
+                                        "actionTitle": "Test"
+                                        }
+                                        ],
+                            "type": 2
+                            }
+                            ]
+                 },
+                 {
+                 "title": "Datetime",
+                 "values": [
+                            {
+                            "type": 1,
+                            "value": "DEMURRAGE LFD\n\nTERMINAL PICKUP APPT\n\nDELIVERY  APPT(setup wiwhse)\n\nPICKUP ON\n据知情人士介绍,微软公司最近就收购 GitHub 一事召开相关会议。这意味着双方再次开启多年以来断断续续的对话通道。\\n之所以选择这一时间,主要考虑到 GitHub 作为软件开发者群体中的高人气平台供应方,最近一直难以找到理想的 CEO 候选人。\\GitHub 公司 2015 年的估值为 20 亿美元,这主要归功于红杉资本为其砸下的 2.5 亿美元投资。此外,多位消息人士告诉我们,GitHub 方面的财务状况相当不错。然而,最终收购价格可能达到 50 亿美元甚至更高,而且考虑到谈判正在进行,目前尚不清楚微软是否愿意支付这么可观的价码。"
+                            }
+                            ]
+                 },
+                 {
+                 "title": "Container Info",
+                 "values": [
+                            {
+                            "type": 3,
+                            "title": "Pick Up",
+                            "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
+                            },
+                            {
+                            "title": "TEL",
+                            "value": "510-8600,FAX:510-8600",
+                            "type": 0
+                            },
+                            {
+                            "title": "EMAIL",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "ATTN",
+                            "value": "",
+                            "type": 0
+                            }
+                            ]
+                 },
+                 {
+                 "title": "Chasis Info",
+                 "values": [
+                            {
+                            "type": 3,
+                            "title": "Pick Up",
+                            "location": "TRANS PACIFIC CONTAINER SERVICE\n\nBERTH 30 2800 7TH ST\n\nOAKLAND,CA\n\n"
+                            },
+                            {
+                            "title": "TEL",
+                            "value": "510-8600,FAX:510-8600",
+                            "type": 0
+                            },
+                            {
+                            "title": "EMAIL",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "ATTN",
+                            "value": "",
+                            "type": 0
+                            }
+                            ]
+                 },
+                 {
+                 "title": "Container Info",
+                 "values": [
+                            {
+                            "title": "Container No.",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Quantity",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Size",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Sch B No.",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Value",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Marks",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Description",
+                            "value": "",
+                            "type": 0
+                            }
+                            ]
+                 },
+                 {
+                 "title": "File Info",
+                 "values": [
+                            {
+                            "title": "File No.",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "BOL No.",
+                            "value": "",
+                            "type": 0
+                            },
+                            {
+                            "title": "Shipper",
+                            "value": "",
+                            "type": 0
+                            }
+                            ]
+                 }
+                 ]
+}

+ 95 - 0
Redant Drivers/Apex And Drivers/FakeData/fake_order_list.json

@@ -0,0 +1,95 @@
+{
+  "result": 2,
+  "sections": [
+    {
+      "type": 2,
+      "title": "New Order",
+      "orders": [
+        {
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000002",
+          "orderNo": "AFS180530001201",
+          "containerNo": "TCNU6432477",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000003",
+          "orderNo": "AFS180530001202",
+          "containerNo": "TCNU6432478",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        }
+      ]
+    },
+    {
+      "type": 1,
+      "title": "Processing Order",
+      "orders": [
+        {
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 1,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000002",
+          "orderNo": "AFS180530001201",
+          "containerNo": "TCNU6432477",
+          "date": "5/30/2018",
+          "status": 1,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000003",
+          "orderNo": "AFS180530001202",
+          "containerNo": "TCNU6432478",
+          "date": "5/30/2018",
+          "status": 1,
+          "title": "Pickup Order New"
+        }
+      ]
+    },
+    {
+      "type": 0,
+      "title": "Finish Order",
+      "orders": [
+        {
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 0,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000002",
+          "orderNo": "AFS180530001201",
+          "containerNo": "TCNU6432477",
+          "date": "5/30/2018",
+          "status": 0,
+          "title": "Pickup Order New"
+        },
+        {
+          "orderID": "00000003",
+          "orderNo": "AFS180530001202",
+          "containerNo": "TCNU6432478",
+          "date": "5/30/2018",
+          "status": 0,
+          "title": "Pickup Order New"
+        }
+      ]
+    }
+  ]
+}

+ 148 - 0
Redant Drivers/Apex And Drivers/Home/Home.storyboard

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Apex & Driver-->
+        <scene sceneID="Ge0-0f-qPP">
+            <objects>
+                <viewController storyboardIdentifier="RAHomeViewController" title="Apex &amp; Driver" useStoryboardIdentifierAsRestorationIdentifier="YES" id="aAb-fo-i8m" customClass="RAHomeViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="kdm-uP-X9c">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="9Pg-qg-cNJ">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAOrderCell" rowHeight="110" id="7yW-4E-SX2" customClass="RAOrderCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="110"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="7yW-4E-SX2" id="86U-Ij-DDb">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="109.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="V2e-NM-tUq">
+                                                    <rect key="frame" x="10" y="31" width="60" height="60"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="60" id="fW9-0H-jGG"/>
+                                                        <constraint firstAttribute="width" constant="60" id="pcF-Ms-1eF"/>
+                                                    </constraints>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pickup Order New" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y2j-9I-xL6">
+                                                    <rect key="frame" x="10" y="5" width="139" height="21"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="21" id="vQr-l2-y2d"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order No.:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LR1-3j-ccn">
+                                                    <rect key="frame" x="75" y="31" width="67.5" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Container No.:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u11-fA-GhG">
+                                                    <rect key="frame" x="75" y="53" width="93" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KA0-85-9AI">
+                                                    <rect key="frame" x="75" y="75" width="34.5" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AFS180530001200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZZd-1e-a8S">
+                                                    <rect key="frame" x="147" y="31" width="125" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TCNU6432476" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ODR-wu-t8u">
+                                                    <rect key="frame" x="173" y="53" width="98.5" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5/30/2018" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="89d-EX-Krm">
+                                                    <rect key="frame" x="114" y="75" width="67" height="17"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Rxe-zz-m6W">
+                                                    <rect key="frame" x="350" y="5" width="20" height="20"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="20" id="G2B-kt-1dz"/>
+                                                        <constraint firstAttribute="width" constant="20" id="SmO-AW-5Qc"/>
+                                                    </constraints>
+                                                </imageView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="u11-fA-GhG" firstAttribute="leading" secondItem="LR1-3j-ccn" secondAttribute="leading" id="4IJ-IF-aH9"/>
+                                                <constraint firstItem="u11-fA-GhG" firstAttribute="top" secondItem="LR1-3j-ccn" secondAttribute="bottom" constant="5" id="4Vg-uE-6ys"/>
+                                                <constraint firstItem="LR1-3j-ccn" firstAttribute="leading" secondItem="V2e-NM-tUq" secondAttribute="trailing" constant="5" id="6Ub-ka-SL1"/>
+                                                <constraint firstItem="ZZd-1e-a8S" firstAttribute="centerY" secondItem="LR1-3j-ccn" secondAttribute="centerY" id="7UQ-V0-epF"/>
+                                                <constraint firstItem="V2e-NM-tUq" firstAttribute="top" secondItem="y2j-9I-xL6" secondAttribute="bottom" constant="5" id="D7x-pV-jvu"/>
+                                                <constraint firstItem="KA0-85-9AI" firstAttribute="leading" secondItem="u11-fA-GhG" secondAttribute="leading" id="HM0-1O-ORm"/>
+                                                <constraint firstItem="ZZd-1e-a8S" firstAttribute="leading" secondItem="LR1-3j-ccn" secondAttribute="trailing" constant="5" id="JeB-Dd-Xld"/>
+                                                <constraint firstItem="V2e-NM-tUq" firstAttribute="leading" secondItem="86U-Ij-DDb" secondAttribute="leading" constant="10" id="Lpd-Fm-zYk"/>
+                                                <constraint firstItem="Rxe-zz-m6W" firstAttribute="centerY" secondItem="y2j-9I-xL6" secondAttribute="centerY" id="NLN-12-bdu"/>
+                                                <constraint firstAttribute="trailing" secondItem="Rxe-zz-m6W" secondAttribute="trailing" constant="5" id="T8f-qI-UHf"/>
+                                                <constraint firstItem="y2j-9I-xL6" firstAttribute="top" secondItem="86U-Ij-DDb" secondAttribute="top" constant="5" id="WkH-3M-eDH"/>
+                                                <constraint firstItem="89d-EX-Krm" firstAttribute="leading" secondItem="KA0-85-9AI" secondAttribute="trailing" constant="5" id="cMF-Gz-E4y"/>
+                                                <constraint firstItem="ODR-wu-t8u" firstAttribute="leading" secondItem="u11-fA-GhG" secondAttribute="trailing" constant="5" id="hUQ-PV-UkX"/>
+                                                <constraint firstItem="Rxe-zz-m6W" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="y2j-9I-xL6" secondAttribute="trailing" constant="10" id="hai-zI-i4o"/>
+                                                <constraint firstItem="y2j-9I-xL6" firstAttribute="leading" secondItem="V2e-NM-tUq" secondAttribute="leading" id="lwV-ra-yDG"/>
+                                                <constraint firstItem="LR1-3j-ccn" firstAttribute="top" secondItem="y2j-9I-xL6" secondAttribute="bottom" constant="5" id="ms8-TV-8N4"/>
+                                                <constraint firstItem="KA0-85-9AI" firstAttribute="top" secondItem="u11-fA-GhG" secondAttribute="bottom" constant="5" id="tv7-84-Qyq"/>
+                                                <constraint firstItem="89d-EX-Krm" firstAttribute="centerY" secondItem="KA0-85-9AI" secondAttribute="centerY" id="wQe-LJ-pJc"/>
+                                                <constraint firstItem="ODR-wu-t8u" firstAttribute="centerY" secondItem="u11-fA-GhG" secondAttribute="centerY" id="y2A-aQ-NUj"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="containerNoLabel" destination="ODR-wu-t8u" id="E2o-Ya-c8a"/>
+                                            <outlet property="dateLabel" destination="89d-EX-Krm" id="b0e-0A-H0f"/>
+                                            <outlet property="markView" destination="Rxe-zz-m6W" id="7oc-i1-cKw"/>
+                                            <outlet property="orderNoLabel" destination="ZZd-1e-a8S" id="nJJ-JC-dEN"/>
+                                            <outlet property="statusView" destination="V2e-NM-tUq" id="sls-Iw-UWW"/>
+                                            <outlet property="titleLabel" destination="y2j-9I-xL6" id="YPB-Xg-Bwr"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="aAb-fo-i8m" id="rLW-aV-WJ7"/>
+                                    <outlet property="delegate" destination="aAb-fo-i8m" id="Lg7-WA-9Vr"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="i9k-YO-Ep6" firstAttribute="trailing" secondItem="9Pg-qg-cNJ" secondAttribute="trailing" id="3br-zt-lSd"/>
+                            <constraint firstItem="9Pg-qg-cNJ" firstAttribute="leading" secondItem="i9k-YO-Ep6" secondAttribute="leading" id="giK-6f-NDD"/>
+                            <constraint firstItem="9Pg-qg-cNJ" firstAttribute="top" secondItem="i9k-YO-Ep6" secondAttribute="top" id="iGq-XW-TKk"/>
+                            <constraint firstItem="i9k-YO-Ep6" firstAttribute="bottom" secondItem="9Pg-qg-cNJ" secondAttribute="bottom" id="s9L-VQ-dMO"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="i9k-YO-Ep6"/>
+                    </view>
+                    <connections>
+                        <outlet property="homeOrderTableView" destination="9Pg-qg-cNJ" id="AEw-eS-qW2"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="gdf-PJ-wGP" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-79.200000000000003" y="128.18590704647679"/>
+        </scene>
+    </scenes>
+</document>

+ 26 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeOrderModel.h

@@ -0,0 +1,26 @@
+//
+//  RAHomeOrderModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+typedef enum {
+    RAOrderStatusFinish = 0,
+    RAOrderStatusProcessing = 1,
+    RAOrderStatusNew = 2
+} RAOrderStatus;
+
+@interface RAHomeOrderModel : NSObject
+
+@property (nonatomic,assign) RAOrderStatus status;
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,copy) NSString *orderNo;
+@property (nonatomic,copy) NSString *containerNo;
+@property (nonatomic,copy) NSString *date;
+@property (nonatomic,copy) NSString *orderID;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeOrderModel.m

@@ -0,0 +1,17 @@
+//
+//  RAHomeOrderModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeOrderModel.h"
+
+@implementation RAHomeOrderModel
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.h

@@ -0,0 +1,13 @@
+//
+//  RAHomeViewController+HomeTableDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeViewController.h"
+
+@interface RAHomeViewController (HomeTableDataSource) <UITableViewDataSource>
+
+@end

+ 33 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.m

@@ -0,0 +1,33 @@
+//
+//  RAHomeViewController+HomeTableDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeViewController+HomeTableDataSource.h"
+#import "RAOrderCell.h"
+#import "RAHomeOrderModel.h"
+
+@implementation RAHomeViewController (HomeTableDataSource) 
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return [self orderSectionCount];
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self orderCountForSection:section];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAOrderCell" forIndexPath:indexPath];
+
+    RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
+    cell.orderModel = order;
+    
+    return cell;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RAHomeViewController+HomeTableDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeViewController.h"
+
+@interface RAHomeViewController (HomeTableDelegate) <UITableViewDelegate>
+
+@end

+ 42 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.m

@@ -0,0 +1,42 @@
+//
+//  RAHomeViewController+HomeTableDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeViewController+HomeTableDelegate.h"
+#import "RAHomeOrderModel.h"
+
+
+@implementation RAHomeViewController (HomeTableDelegate)
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 110.0f;
+}
+
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+    
+    UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 44.0f)];
+    header.backgroundColor = [UIColor lightGrayColor];
+    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 11, CGRectGetWidth(tableView.bounds) - 20, 22)];
+    [header addSubview:label];
+    
+    label.text = [self titleForSection:section];
+    
+    return header;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 44.f;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
+    [self pushDetailViewControllerForModel:order];
+    
+}
+
+@end

+ 27 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.h

@@ -0,0 +1,27 @@
+//
+//  RAHomeViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+@class RAHomeOrderModel;
+@interface RAHomeViewController : RABaseViewController
+
+@property (strong, nonatomic) IBOutlet UITableView *homeOrderTableView;
+
+#pragma mark - Getter
+
+- (NSUInteger)orderSectionCount;
+- (NSUInteger)orderCountForSection:(NSInteger)section;
+- (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath;
+- (NSString *)titleForSection:(NSInteger)section;
+
+#pragma mark - Controller Action
+
+- (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model;
+
+@end

+ 160 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -0,0 +1,160 @@
+//
+//  RAHomeViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeViewController.h"
+#import "RAHomeOrderModel.h"
+#import "RAOrderDetailViewController.h"
+
+@interface RAHomeSectionModel : NSObject
+
+@property (nonatomic,assign) RAOrderStatus type;
+@property (nonatomic,strong) NSArray <RAHomeOrderModel *> *orders;
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,readonly) NSInteger ordersCount;
+
+@end
+
+@implementation RAHomeSectionModel
+
+- (void)setOrders:(NSArray *)orders {
+    
+    NSMutableArray *orderArr = [NSMutableArray array];
+    for (int i = 0; i < orders.count; i++) {
+        NSDictionary *order = [orders objectAtIndex:i];
+        RAHomeOrderModel *orderModel = [RAHomeOrderModel new];
+        [orderModel setValuesForKeysWithDictionary:order];
+        [orderArr addObject:orderModel];
+    }
+    _orders = orderArr;
+}
+
+- (RAHomeOrderModel *)orderModelForIndex:(NSInteger)index {
+    return [self.orders objectAtIndex:index];
+}
+
+- (NSInteger)ordersCount {
+    return self.orders.count;
+}
+
+@end
+
+
+@interface RAHomeViewController ()
+
+@property (nonatomic,strong) NSMutableArray <RAHomeSectionModel *> *sectionArray;
+
+@end
+
+@implementation RAHomeViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    RAHomeViewController *homeVC = [[UIStoryboard storyboardWithName:@"Home" bundle:nil] instantiateViewControllerWithIdentifier:[self storyboardID]];
+    return homeVC;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self configureTable];
+    [self loadData];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)configureTable {
+    
+    self.homeOrderTableView.tableFooterView = [UIView new];
+    self.homeOrderTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
+}
+
+#pragma mark Getter
+
+- (NSMutableArray *)sectionArray {
+    if (!_sectionArray) {
+        _sectionArray = [NSMutableArray array];
+    }
+    return _sectionArray;
+}
+
+- (NSUInteger)orderSectionCount {
+    
+    return self.sectionArray.count;
+}
+
+- (NSUInteger)orderCountForSection:(NSInteger)section {
+    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
+    return [sectionModel ordersCount];
+}
+
+- (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath {
+    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:indexPath.section];
+    return [sectionModel orderModelForIndex:indexPath.row];
+}
+
+- (NSString *)titleForSection:(NSInteger)section {
+    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
+    return sectionModel.title;
+}
+
+#pragma mark - Data
+
+- (void)loadData {
+    
+    // show progress
+    
+    __weak typeof(self) weakSelf = self;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+       
+        NSDictionary *json = [RADataProvider requestOrderList];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            
+            // dismiss progress
+            
+            if (weakSelf) {
+                __strong typeof(weakSelf) strongSelf = weakSelf;
+                
+                int result = [[json objectForKey:@"result"] intValue];
+                if (result == RESULT_TRUE) {
+                    
+                    NSArray *sectionArray = [json objectForKey:@"sections"];
+                    [strongSelf.sectionArray removeAllObjects];
+                    for (int i = 0; i < sectionArray.count; i++) {
+                        NSDictionary *section = [sectionArray objectAtIndex:i];
+                        RAHomeSectionModel *sectionModel = [RAHomeSectionModel new];
+                        [sectionModel setValuesForKeysWithDictionary:section];
+                        [strongSelf.sectionArray addObject:sectionModel];
+                    }
+
+                    [strongSelf.homeOrderTableView reloadData];
+                    
+                } else {
+                    // process error
+                    
+                }
+            }
+            
+        });
+        
+    });
+}
+
+#pragma mark - Controller Action
+
+- (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model {
+    
+    RAOrderDetailViewController *detailVC = [RAOrderDetailViewController viewControllerFromStoryboard];
+    detailVC.orderID = model.orderID;
+    [self.navigationController pushViewController:detailVC animated:YES];
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Home/RAOrderCell.h

@@ -0,0 +1,16 @@
+//
+//  RAOrderCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RAHomeOrderModel;
+@interface RAOrderCell : UITableViewCell
+
+@property (nonatomic,strong) RAHomeOrderModel *orderModel;
+
+@end

+ 90 - 0
Redant Drivers/Apex And Drivers/Home/RAOrderCell.m

@@ -0,0 +1,90 @@
+//
+//  RAOrderCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderCell.h"
+#import "RAHomeOrderModel.h"
+
+@interface RAOrderCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
+@property (strong, nonatomic) IBOutlet UILabel *orderNoLabel;
+@property (strong, nonatomic) IBOutlet UILabel *containerNoLabel;
+@property (strong, nonatomic) IBOutlet UILabel *dateLabel;
+@property (strong, nonatomic) IBOutlet UIImageView *markView;
+@property (strong, nonatomic) IBOutlet UIImageView *statusView;
+
+
+@end
+
+@implementation RAOrderCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    [self setOrderModel:nil];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    [self setOrderModel:nil];
+}
+
+#pragma mark - Set
+
+- (void)setOrderModel:(RAHomeOrderModel *)orderModel {
+    _orderModel = orderModel;
+    
+    NSString *title = _orderModel.title;
+    NSString *orderNo = _orderModel.orderNo;
+    NSString *containerNo = _orderModel.containerNo;
+    NSString *date = _orderModel.date;
+    RAOrderStatus status = _orderModel.status;
+    
+    [[[[[self setTitle:title] setOrderNo:orderNo] setContainerNo:containerNo] setDate:date] setStatus:status];
+}
+
+- (instancetype)setTitle:(NSString *)title {
+    self.titleLabel.text = title;
+    
+    return self;
+}
+
+- (instancetype)setOrderNo:(NSString *)orderNo {
+    self.orderNoLabel.text = orderNo;
+    
+    return self;
+}
+
+- (instancetype)setContainerNo:(NSString *)containerNo {
+    self.containerNoLabel.text = containerNo;
+    
+    return self;
+}
+
+- (instancetype)setDate:(NSString *)date {
+    self.dateLabel.text = date;
+    
+    return self;
+}
+
+- (instancetype)setStatus:(RAOrderStatus)status {
+
+    self.markView.hidden = status != RAOrderStatusNew;
+    
+    return self;
+}
+
+@end

+ 0 - 4
Redant Drivers/Apex And Drivers/Info.plist

@@ -26,8 +26,6 @@
 	</array>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
-	<key>UIMainStoryboardFile</key>
-	<string>Main</string>
 	<key>UIRequiredDeviceCapabilities</key>
 	<array>
 		<string>armv7</string>
@@ -35,8 +33,6 @@
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>

+ 242 - 0
Redant Drivers/Apex And Drivers/Login/Login.storyboard

@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Login-->
+        <scene sceneID="bLx-RG-pI5">
+            <objects>
+                <viewController storyboardIdentifier="LoginViewController" title="Login" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bft-hS-tbx" customClass="LoginViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="6Mm-eS-rAo"/>
+                        <viewControllerLayoutGuide type="bottom" id="KzV-Ny-317"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="jSh-rY-8BJ">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qCw-s3-fQH">
+                                <rect key="frame" x="0.0" y="268.5" width="375" height="130"/>
+                                <subviews>
+                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="User" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="VlU-9K-g4X">
+                                        <rect key="frame" x="20" y="0.0" width="335" height="30"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="30" id="fEJ-5y-wXK"/>
+                                        </constraints>
+                                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                    </textField>
+                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Password" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="9gC-X8-VVb">
+                                        <rect key="frame" x="20" y="50" width="335" height="30"/>
+                                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/>
+                                    </textField>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qz0-oF-i3d">
+                                        <rect key="frame" x="317" y="104" width="38" height="30"/>
+                                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
+                                        <state key="normal" title="Login">
+                                            <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="LoginButtonClick:" destination="bft-hS-tbx" eventType="touchUpInside" id="0hN-aU-ntl"/>
+                                        </connections>
+                                    </button>
+                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vy2-V9-9ML">
+                                        <rect key="frame" x="20" y="110" width="127" height="18"/>
+                                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                        <state key="normal" title="  Save password" image="unchecked_32">
+                                            <color key="titleColor" red="0.0" green="0.50196081400000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                    </button>
+                                    <activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="n26-yz-BRQ">
+                                        <rect key="frame" x="287" y="109" width="20" height="20"/>
+                                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
+                                    </activityIndicatorView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                <constraints>
+                                    <constraint firstItem="9gC-X8-VVb" firstAttribute="width" secondItem="VlU-9K-g4X" secondAttribute="width" id="1rw-dl-JUG"/>
+                                    <constraint firstItem="VlU-9K-g4X" firstAttribute="leading" secondItem="qCw-s3-fQH" secondAttribute="leading" constant="20" id="29G-qP-j9S"/>
+                                    <constraint firstItem="VlU-9K-g4X" firstAttribute="centerX" secondItem="qCw-s3-fQH" secondAttribute="centerX" id="4kK-EF-vvZ"/>
+                                    <constraint firstItem="n26-yz-BRQ" firstAttribute="centerY" secondItem="Qz0-oF-i3d" secondAttribute="centerY" id="Diz-xM-v0k"/>
+                                    <constraint firstItem="Qz0-oF-i3d" firstAttribute="trailing" secondItem="9gC-X8-VVb" secondAttribute="trailing" id="ELj-Pp-6u0"/>
+                                    <constraint firstItem="Qz0-oF-i3d" firstAttribute="top" secondItem="9gC-X8-VVb" secondAttribute="bottom" constant="24" id="FxS-Oc-vVk"/>
+                                    <constraint firstItem="9gC-X8-VVb" firstAttribute="top" secondItem="VlU-9K-g4X" secondAttribute="bottom" constant="20" id="QwQ-XT-xkf"/>
+                                    <constraint firstItem="vy2-V9-9ML" firstAttribute="leading" secondItem="9gC-X8-VVb" secondAttribute="leading" id="aws-uB-39W"/>
+                                    <constraint firstItem="VlU-9K-g4X" firstAttribute="top" secondItem="qCw-s3-fQH" secondAttribute="top" id="nOV-Rf-3kV"/>
+                                    <constraint firstAttribute="height" constant="130" id="nQC-EH-PLF"/>
+                                    <constraint firstItem="Qz0-oF-i3d" firstAttribute="leading" secondItem="n26-yz-BRQ" secondAttribute="trailing" constant="10" id="pyO-o5-w4j"/>
+                                    <constraint firstItem="9gC-X8-VVb" firstAttribute="centerX" secondItem="qCw-s3-fQH" secondAttribute="centerX" id="qfR-jT-s4Z"/>
+                                    <constraint firstItem="vy2-V9-9ML" firstAttribute="centerY" secondItem="Qz0-oF-i3d" secondAttribute="centerY" id="qjq-Ld-Wsm"/>
+                                </constraints>
+                            </view>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="apexlogo-1" translatesAutoresizingMaskIntoConstraints="NO" id="uPR-4Z-qVR">
+                                <rect key="frame" x="49.5" y="49" width="276" height="120"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="120" id="4oM-B6-IP5"/>
+                                    <constraint firstAttribute="width" constant="276" id="aMO-mC-yGI"/>
+                                </constraints>
+                                <inset key="insetFor6xAndEarlier" minX="0.0" minY="40" maxX="0.0" maxY="-40"/>
+                            </imageView>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4nB-rd-0CZ">
+                                <rect key="frame" x="183" y="426.5" width="172" height="30"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="172" id="ROU-8P-HXY"/>
+                                </constraints>
+                                <state key="normal" title="Retrieve password"/>
+                                <connections>
+                                    <action selector="RetrieveButtonClick:" destination="bft-hS-tbx" eventType="touchUpInside" id="yuJ-Bq-epd"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ver:A160422" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hEP-az-ldq">
+                                <rect key="frame" x="20" y="30" width="82.5" height="17"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="calibratedWhite"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="uPR-4Z-qVR" firstAttribute="centerX" secondItem="jSh-rY-8BJ" secondAttribute="centerX" id="5pf-lB-Mm4"/>
+                            <constraint firstItem="hEP-az-ldq" firstAttribute="top" secondItem="6Mm-eS-rAo" secondAttribute="bottom" constant="10" id="8mY-tL-gaO"/>
+                            <constraint firstItem="qCw-s3-fQH" firstAttribute="width" secondItem="jSh-rY-8BJ" secondAttribute="width" id="MS5-9p-o7T"/>
+                            <constraint firstItem="4nB-rd-0CZ" firstAttribute="top" secondItem="Qz0-oF-i3d" secondAttribute="bottom" constant="24" id="MwQ-kO-4g7"/>
+                            <constraint firstItem="uPR-4Z-qVR" firstAttribute="top" secondItem="6Mm-eS-rAo" secondAttribute="bottom" constant="29" id="O4A-nP-rYp"/>
+                            <constraint firstItem="qCw-s3-fQH" firstAttribute="centerX" secondItem="jSh-rY-8BJ" secondAttribute="centerX" id="ODC-DF-6A9"/>
+                            <constraint firstItem="hEP-az-ldq" firstAttribute="leading" secondItem="jSh-rY-8BJ" secondAttribute="leading" constant="20" id="OwY-VO-t5P"/>
+                            <constraint firstItem="qCw-s3-fQH" firstAttribute="centerY" secondItem="jSh-rY-8BJ" secondAttribute="centerY" priority="999" id="WuP-h2-Qx9"/>
+                            <constraint firstItem="4nB-rd-0CZ" firstAttribute="trailing" secondItem="9gC-X8-VVb" secondAttribute="trailing" id="iXl-Es-zfd"/>
+                            <constraint firstItem="qCw-s3-fQH" firstAttribute="top" relation="greaterThanOrEqual" secondItem="uPR-4Z-qVR" secondAttribute="bottom" constant="10" id="qMF-Aw-XEh"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="eN5-fH-f6F"/>
+                    </view>
+                    <tabBarItem key="tabBarItem" title="Login" image="tab_login" id="7cB-CR-vqD"/>
+                    <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
+                    <nil key="simulatedTopBarMetrics"/>
+                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
+                    <connections>
+                        <outlet property="btnRetrievePassword" destination="4nB-rd-0CZ" id="W8b-Z2-ap1"/>
+                        <outlet property="checkSavePassword" destination="vy2-V9-9ML" id="TPX-Vp-7eD"/>
+                        <outlet property="editPassword" destination="9gC-X8-VVb" id="GvF-9N-kb3"/>
+                        <outlet property="editUser" destination="VlU-9K-g4X" id="5Ky-7b-R1r"/>
+                        <outlet property="loginButton" destination="Qz0-oF-i3d" id="oBP-jj-B0M"/>
+                        <outlet property="mum" destination="n26-yz-BRQ" id="Wmb-sr-6Fu"/>
+                        <outlet property="verLabel" destination="hEP-az-ldq" id="7EU-Nt-Mf7"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="otq-r3-uRx" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="656.79999999999995" y="-2448.1259370314842"/>
+        </scene>
+        <!--Retrieve Password View Controller-->
+        <scene sceneID="5za-E3-6PF">
+            <objects>
+                <viewController storyboardIdentifier="RetrievePasswordViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="1CN-o6-L44" customClass="RetrievePasswordViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="xAq-H9-nRh"/>
+                        <viewControllerLayoutGuide type="bottom" id="zuh-Qc-obd"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8lZ-nd-1Dp">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="User name" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="NxN-sx-m5j">
+                                <rect key="frame" x="47.5" y="53" width="280" height="30"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="30" id="Flw-Vt-TlV"/>
+                                    <constraint firstAttribute="width" constant="280" id="QMA-mk-bfs"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                <connections>
+                                    <outlet property="delegate" destination="1CN-o6-L44" id="a49-LD-ALi"/>
+                                </connections>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Email" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Qyz-eH-lzt">
+                                <rect key="frame" x="47.5" y="88" width="280" height="30"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="280" id="cAe-61-D7H"/>
+                                    <constraint firstAttribute="height" constant="30" id="wE4-m1-Lyf"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                <connections>
+                                    <outlet property="delegate" destination="1CN-o6-L44" id="gOt-4t-bM8"/>
+                                </connections>
+                            </textField>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8vH-Bt-vmC">
+                                <rect key="frame" x="47" y="128" width="48" height="30"/>
+                                <state key="normal" title="Cancel">
+                                    <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="OnCancel:" destination="1CN-o6-L44" eventType="touchUpInside" id="X5z-8H-kEW"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5lz-8M-zkN">
+                                <rect key="frame" x="297" y="128" width="30" height="30"/>
+                                <state key="normal" title="Ok">
+                                    <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="OnOk:" destination="1CN-o6-L44" eventType="touchUpInside" id="6rl-Cp-cRh"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Retrieve Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z88-in-EvQ">
+                                <rect key="frame" x="109.5" y="25" width="156.5" height="23"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="19"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="dzY-Oe-mGB">
+                                <rect key="frame" x="169" y="315" width="37" height="37"/>
+                                <color key="color" red="0.40000000600000002" green="0.80000001190000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </activityIndicatorView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="Qyz-eH-lzt" firstAttribute="centerX" secondItem="8lZ-nd-1Dp" secondAttribute="centerX" id="7ns-Xh-cfR"/>
+                            <constraint firstItem="5lz-8M-zkN" firstAttribute="trailing" secondItem="Qyz-eH-lzt" secondAttribute="trailing" id="FND-x2-3Jd"/>
+                            <constraint firstItem="z88-in-EvQ" firstAttribute="top" secondItem="xAq-H9-nRh" secondAttribute="bottom" constant="5" id="Hm3-GD-Ui1"/>
+                            <constraint firstItem="NxN-sx-m5j" firstAttribute="centerX" secondItem="8lZ-nd-1Dp" secondAttribute="centerX" id="Jha-fu-1vU"/>
+                            <constraint firstItem="8vH-Bt-vmC" firstAttribute="leading" secondItem="Qyz-eH-lzt" secondAttribute="leading" id="P3T-lq-fKL"/>
+                            <constraint firstItem="NxN-sx-m5j" firstAttribute="top" secondItem="z88-in-EvQ" secondAttribute="bottom" constant="5" id="R73-mB-VYV"/>
+                            <constraint firstItem="8vH-Bt-vmC" firstAttribute="top" secondItem="Qyz-eH-lzt" secondAttribute="bottom" constant="10" id="VTD-UE-T8P"/>
+                            <constraint firstItem="z88-in-EvQ" firstAttribute="centerX" secondItem="8lZ-nd-1Dp" secondAttribute="centerX" id="dRG-E0-vHV"/>
+                            <constraint firstItem="dzY-Oe-mGB" firstAttribute="centerY" secondItem="8lZ-nd-1Dp" secondAttribute="centerY" id="eYL-IY-FSs"/>
+                            <constraint firstItem="5lz-8M-zkN" firstAttribute="top" secondItem="8vH-Bt-vmC" secondAttribute="top" id="fg2-l1-cQM"/>
+                            <constraint firstItem="dzY-Oe-mGB" firstAttribute="centerX" secondItem="8lZ-nd-1Dp" secondAttribute="centerX" id="oQv-Ue-crw"/>
+                            <constraint firstItem="Qyz-eH-lzt" firstAttribute="top" secondItem="NxN-sx-m5j" secondAttribute="bottom" constant="5" id="tSB-iH-lFp"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="fCm-6G-ZPa"/>
+                    </view>
+                    <navigationItem key="navigationItem" id="tHq-vU-qI2"/>
+                    <connections>
+                        <outlet property="btnCancel" destination="8vH-Bt-vmC" id="qsS-fp-gyh"/>
+                        <outlet property="btnOk" destination="5lz-8M-zkN" id="tcZ-fx-LNf"/>
+                        <outlet property="editEmail" destination="Qyz-eH-lzt" id="owt-jI-eOQ"/>
+                        <outlet property="editUser" destination="NxN-sx-m5j" id="d4A-Mg-hQ3"/>
+                        <outlet property="mum" destination="dzY-Oe-mGB" id="Js5-L0-TUS"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="GhA-p4-dOH" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2312.8000000000002" y="-2448.1259370314842"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="apexlogo-1" width="16" height="16"/>
+        <image name="tab_login" width="16" height="16"/>
+        <image name="unchecked_32" width="16" height="16"/>
+    </resources>
+</document>

+ 29 - 0
Redant Drivers/Apex And Drivers/Login/LoginViewController.h

@@ -0,0 +1,29 @@
+//
+//  LoginViewController.h
+//  Apex Mobile
+//
+//  Created by Ray on 25/01/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+
+@interface LoginViewController : RABaseViewController<UITextFieldDelegate>
+
+@property (nonatomic , copy) void (^loginSuccessful)(void);
+@property (strong, nonatomic) IBOutlet UIButton *checkSavePassword;
+@property (strong, nonatomic) IBOutlet UITextField *editUser;
+@property (strong, nonatomic) IBOutlet UITextField *editPassword;
+@property (strong, nonatomic) IBOutlet UIButton *loginButton;
+@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *mum;
+@property (strong, nonatomic) IBOutlet UIButton *btnRetrievePassword;
+@property bool resize;
+@property int ioffset;
+
+- (void)clear;
+
+
+
+@end
+

+ 293 - 0
Redant Drivers/Apex And Drivers/Login/LoginViewController.m

@@ -0,0 +1,293 @@
+//
+//  LoginViewController.m
+//  Apex Mobile
+//
+//  Created by Ray on 25/01/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import "LoginViewController.h"
+#import "RetrievePasswordViewController.h"
+
+@interface LoginViewController ()
+@property (strong, nonatomic) IBOutlet UILabel *verLabel;
+
+@end
+
+@implementation LoginViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    LoginViewController *loginVC = [[UIStoryboard storyboardWithName:@"Login" bundle:nil] instantiateViewControllerWithIdentifier:[LoginViewController storyboardID]];
+    return loginVC;
+}
+
+- (void)clear {
+    self.editPassword.text = nil;
+    self.editUser.text = nil;
+}
+
+- (IBAction)RetrieveButtonClick:(UIButton *)sender {
+//    [self performSegueWithIdentifier:@"RETRIEVE" sender:self];
+    
+    RetrievePasswordViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"RetrievePasswordViewController"];
+    vc.preferredContentSize = CGSizeMake(330, 160);
+    [self presentViewController:vc animated:YES completion:nil];
+    
+}
+
+
+- (IBAction)LoginButtonClick:(UIButton *)sender {
+    
+    
+    
+    NSString*password= self.editPassword.text;
+    NSString*user = self.editUser.text;
+    if(user.length==0||password.length==0)
+    {
+        
+        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:NSLocalizedString(@"alert_msg_upcanotempty", nil) preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            
+        }];
+        
+        [alertVC addAction:action];
+        
+        [self presentViewController:alertVC animated:YES completion:nil];
+        
+        
+        return;
+    }
+    DebugLog(@"Login...   user= %@ ; password= %@",self.editUser.text,self.editPassword.text);
+    
+    
+    self.loginButton.enabled = false;
+    self.mum.hidden=false;
+    NSString *request_user = self.editUser.text.lowercaseString;
+    NSString *request_password = self.editPassword.text;
+    
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        
+        
+        NSDictionary *loginInfo =[RADataProvider requestLogin:request_user password:request_password];
+        
+        int ret = [[loginInfo objectForKey:@"result"] intValue];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            self.mum.hidden=true;
+            self.loginButton.enabled = true;
+            
+            if (ret==RESULT_TRUE)
+            {
+                
+                NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+                [defaults removeObjectForKey:@"user"];
+                [defaults removeObjectForKey:@"password"];
+               
+                [defaults setValue:[AESCrypt encrypt:self.editUser.text.lowercaseString password:@"usai"] forKey:@"user"];
+                [defaults setValue:[AESCrypt encrypt:self.editPassword.text password:@"usai"] forKey:@"password"];
+                [defaults setBool:TRUE forKey:@"autologin"];
+                
+                [defaults synchronize];
+                
+                if(self.loginSuccessful)
+                    self.loginSuccessful();
+                
+            }
+            else
+            {
+                NSString* message = nil;
+                switch (ret) {
+                    case RESULT_NET_NOTAVAILABLE:
+                        message = NSLocalizedString(@"net_not_available", nil);
+                        break;
+                    case RESULT_NET_ERROR:
+                        message = NSLocalizedString(@"net_error", nil);
+                        break;
+                    case RESULT_FALSE:
+                        message = NSLocalizedString(@"auth_error", nil);
+                        break;
+                    case RESULT_VER_LOW:
+                        message = NSLocalizedString(@"ver_low", nil);
+                        break;
+                        
+                    default:
+                        message=[NSString stringWithFormat:@"Failed to login code %d",ret];
+                        break;
+                }
+                
+                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:message preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                    
+                }];
+                
+                [alertVC addAction:action];
+                
+                [self presentViewController:alertVC animated:YES completion:nil];
+            }
+            
+            
+            
+        });
+    });
+    
+    
+    
+}
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+    [[self view] endEditing:YES];
+}
+
+-(void)checkboxClick:(UIButton *)btn
+{
+    btn.selected = !btn.selected;
+}
+//- (IBAction)onRetrievePassword:(UIButton *)sender {
+//}
+
+- (void)viewDidLoad
+{
+    [super viewDidLoad];
+    [self.checkSavePassword setImage:[UIImage imageNamed:@"unchecked_32.png"] forState:UIControlStateNormal];
+    [self.checkSavePassword setImage:[UIImage imageNamed:@"checked_32.png"] forState:UIControlStateSelected];
+    
+    
+    self.editUser.delegate = self;
+    self.editPassword.delegate = self;
+    self.resize = false;
+    self.ioffset = 0;
+    
+    
+    self.title=@"Login";
+    
+    
+    [self.checkSavePassword addTarget:self action:@selector(checkboxClick:) forControlEvents:UIControlEventTouchUpInside];
+    //    [self.view addSubview:checkSavePassword];
+    // Do any additional setup after loading the view, typically from a nib.
+    
+    self.mum.backgroundColor = [UIColor clearColor];
+    
+    NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
+    
+    NSString* shortNum =[infoDict objectForKey:@"CFBundleShortVersionString"];
+    NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];
+    versionNum = [NSString stringWithFormat:@"ver:%@.A%@",shortNum,versionNum];
+    
+    self.verLabel.text = versionNum;
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    NSString * user = [AESCrypt decrypt:[defaults stringForKey:@"user"] password:@"usai"];
+    NSString * password = [AESCrypt decrypt:[defaults stringForKey:@"password"] password:@"usai"];
+    
+    if(user.length>0&&password.length>0)
+    {
+        self.editUser.text=user;
+        self.editPassword.text=password;
+        self.checkSavePassword.selected=true;
+        
+    }
+    
+    [self clearNavigationbar];
+    [self configureNavigationBar];
+}
+
+- (void)clearNavigationbar {
+    self.tabBarController.navigationItem.leftBarButtonItem = nil;
+    self.tabBarController.navigationItem.leftBarButtonItems = nil;
+    self.tabBarController.navigationItem.titleView = nil;
+    self.tabBarController.navigationItem.title = nil;
+    self.tabBarController.navigationItem.rightBarButtonItem = nil;
+    self.tabBarController.navigationItem.rightBarButtonItems = nil;
+}
+
+- (void)configureNavigationBar {
+    
+    if (self.navigationController && !self.navigationController.isNavigationBarHidden) {
+        
+        UIImage *logo = [[UIImage imageNamed:@"apexlogo-2"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
+        UIBarButtonItem *logoItem = [[UIBarButtonItem alloc] initWithImage:logo landscapeImagePhone:logo style:UIBarButtonItemStylePlain target:nil action:nil];
+        logoItem.enabled = NO;
+        self.tabBarController.navigationItem.leftBarButtonItem = logoItem;
+    }
+}
+
+
+- (void)didReceiveMemoryWarning
+{
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+-(BOOL)textFieldShouldReturn:(UITextField *)textField {
+    
+    [textField resignFirstResponder];
+    return YES;
+}
+-(void) textFieldDidBeginEditing:(UITextField *)textField
+{
+    //    CGRect textFrame =  self.loginButton.frame;
+    int loginpos = self.loginButton.frame.origin.y+self.loginButton.frame.size.height;
+    self.ioffset = 216 -(self.view.frame.size.height-loginpos);
+    if(self.ioffset>0)
+    {
+        self.resize = true;
+        NSTimeInterval animationDuration = 0.30f;
+        CGRect frame = self.view.frame;
+        frame.origin.y -=self.ioffset;//view的Y轴上移
+        frame.size.height +=self.ioffset; //View的高度增加
+        self.view.frame = frame;
+        [UIView beginAnimations:@"ResizeView" context:nil];
+        [UIView setAnimationDuration:animationDuration];
+        self.view.frame = frame;
+        [UIView commitAnimations];//设置调整界面的动画效果
+    }
+}
+
+/**
+ 结束编辑UITextField的方法,让原来的界面还原高度
+ */
+-(void) textFieldDidEndEditing:(UITextField *)textField
+{
+    //    if(prewTag == -1) //当编辑的View不是需要移动的View
+    //    {
+    //        return;
+    //    }
+    //    float moveY ;
+    
+    if(self.resize)
+    {
+        NSTimeInterval animationDuration = 0.30f;
+        CGRect frame = self.view.frame;
+        //    if(prewTag == textField.tag) //当结束编辑的View的TAG是上次的就移动
+        //    {   //还原界面
+        //        moveY =  prewMoveY;
+        frame.origin.y +=self.ioffset;
+        frame.size. height -=self.ioffset;
+        self.view.frame = frame;
+        //    }
+        //self.view移回原位置
+        [UIView beginAnimations:@"ResizeView" context:nil];
+        [UIView setAnimationDuration:animationDuration];
+        self.view.frame = frame;
+        [UIView commitAnimations];
+        [textField resignFirstResponder];
+        self.ioffset=0;
+    }
+    
+}
+
+- (void)alertTitle:(NSString *)title withMessage:(NSString *)msg {
+    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        
+    }];
+    [alertVC addAction:okAction];
+    [self presentViewController:alertVC animated:YES completion:nil];
+}
+
+@end

+ 20 - 0
Redant Drivers/Apex And Drivers/Login/RetrievePasswordViewController.h

@@ -0,0 +1,20 @@
+//
+//  RetrievePasswordViewController.h
+//  Apex Mobile
+//
+//  Created by Ray on 14-3-17.
+//  Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "JLCustomerAlertController.h"
+
+
+@interface RetrievePasswordViewController : JLCustomerAlertController<UITextFieldDelegate>
+@property (strong, nonatomic) IBOutlet UITextField *editUser;
+@property (strong, nonatomic) IBOutlet UITextField *editEmail;
+@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *mum;
+@property (strong, nonatomic) IBOutlet UIButton *btnOk;
+
+@property (strong, nonatomic) IBOutlet UIButton *btnCancel;
+@end

+ 149 - 0
Redant Drivers/Apex And Drivers/Login/RetrievePasswordViewController.m

@@ -0,0 +1,149 @@
+//
+//  RetrievePasswordViewController.m
+//  Apex Mobile
+//
+//  Created by Ray on 14-3-17.
+//  Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
+//
+
+#import "RetrievePasswordViewController.h"
+
+@interface RetrievePasswordViewController ()
+
+@end
+
+@implementation RetrievePasswordViewController
+- (IBAction)OnCancel:(UIButton *)sender {
+    [self dismissViewControllerAnimated:true completion:^{
+        ;
+    }];
+}
+
+- (BOOL)shouldAutorotate
+{
+    return YES;
+}
+
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations
+{
+    return UIInterfaceOrientationMaskPortrait;
+}
+
+- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
+{
+    return UIInterfaceOrientationPortrait;
+}
+- (IBAction)OnOk:(UIButton *)sender {
+    
+    NSString* user = self.editUser.text;
+    NSString* email = self.editEmail.text;
+
+    if(user.length==0||email.length==0)
+    {
+        
+        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:NSLocalizedString(@"alert_msg_uecanotempty", nil) preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            
+        }];
+        
+        [alertVC addAction:action];
+        
+        [self presentViewController:alertVC animated:YES completion:nil];
+        
+        return;
+    }
+    
+    self.btnOk.enabled = false;
+    self.btnCancel.enabled=false;
+    
+    self.mum.hidden=false;
+    
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        
+        
+        int ret = [RADataProvider requestRetrievePassword:user email:email];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            self.mum.hidden=true;
+            self.btnOk.enabled = true;
+            self.btnCancel.enabled=true;
+            
+            if (ret==RESULT_TRUE)
+            {
+                
+                
+                [self dismissViewControllerAnimated:true completion:^{
+                    
+                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_retrieve_success", nil) message:NSLocalizedString(@"alert_msg_email_sent", nil) preferredStyle:UIAlertControllerStyleAlert];
+                    UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                        
+                    }];
+                    
+                    [alertVC addAction:action];
+                    
+//                    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+//                    [appDelegate.window.rootViewController presentViewController:alertVC animated:YES completion:nil];
+                }];
+            }
+            else
+            {
+                
+                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:[NSString stringWithFormat:NSLocalizedString(@"alert_msg_failed_retrieve_password", nil),ret] preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                    
+                }];
+                
+                [alertVC addAction:action];
+                
+                [self presentViewController:alertVC animated:YES completion:nil];
+            }
+            
+            
+            
+        });
+    });
+}
+
+
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+    if (self) {
+        // Custom initialization
+    }
+    return self;
+}
+
+- (void)viewDidLoad
+{
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+- (void)didReceiveMemoryWarning
+{
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+    [[self view] endEditing:YES];
+}
+-(BOOL)textFieldShouldReturn:(UITextField *)textField {
+    
+    [textField resignFirstResponder];
+    return YES;
+}
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
+{
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 25 - 0
Redant Drivers/Apex And Drivers/PrefixHeader.pch

@@ -0,0 +1,25 @@
+//
+//  PrefixHeader.pch
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef PrefixHeader_pch
+#define PrefixHeader_pch
+
+// Include any system framework and library headers here that should be included in all compilation units.
+// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
+
+#ifdef __OBJC__
+
+#import "const.h"
+#import "config.h"
+#import "AESCrypt.h"
+#import "RADataProvider.h"
+
+
+#endif
+
+#endif /* PrefixHeader_pch */

+ 21 - 0
Redant Drivers/Apex And Drivers/RADataProvider.h

@@ -0,0 +1,21 @@
+//
+//  RADataProvider.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface RADataProvider : NSObject
+
++ (NSDictionary *)requestLogin:(NSString *)user password:(NSString *)pwd;
+
++ (NSDictionary *)requestOrderList;
+
++ (NSDictionary *)requestOrderDetail:(NSString *)orderID;
+
++(int) requestRetrievePassword : (NSString*)user  email:(NSString*)email;
+
+@end

+ 206 - 0
Redant Drivers/Apex And Drivers/RADataProvider.m

@@ -0,0 +1,206 @@
+//
+//  RADataProvider.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADataProvider.h"
+#import "NetworkUtils.h"
+#import "ZipArchive.h"
+#import "AESCrypt.h"
+
+
+@implementation RADataProvider
+
++(NSMutableDictionary*) prepare_addtional_params:(NSMutableDictionary* ) params
+{
+    
+    if (params == nil) {
+        params = [NSMutableDictionary dictionary];
+    }
+    
+//    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//
+//
+//    if(appDelegate.user!=nil && params[@"user"] == nil)
+//        [params setValue:appDelegate.user  forKey:@"user"];
+//    if(appDelegate.password!=nil&& params[@"pwd"] == nil)
+//        [params setValue:appDelegate.password  forKey:@"pwd"];
+    
+//    [params setValue:appDelegate.build forKey:@"app_ver"];
+    
+    NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
+    NSString* short_version =[infoDict objectForKey:@"CFBundleShortVersionString"];
+    [params setValue:short_version forKey:@"app_short_ver"];
+    
+    
+    
+#if TARGET_IPHONE_SIMULATOR//模拟器
+    [params setValue:@"simulator_uuid" forKey:@"deviceid"];
+#elif TARGET_OS_IPHONE//真机
+    UIDevice * dev = [UIDevice currentDevice];
+    NSUUID* uuid =dev.identifierForVendor;
+    [params setValue:uuid.UUIDString forKey:@"deviceid"];
+#endif
+    
+    return params;
+}
+
++(NSData*)get_json : (NSString*) url parameters:(NSMutableDictionary *) params file:(NSString *) file //delegate:(id < NSURLConnectionDelegate >)delegate
+{
+    
+    
+    
+    params = [self prepare_addtional_params:params];
+    
+    return [NetworkUtils get_json:url parameters:params file:file err_recorder:URL_ERR_LOG result_handler:^NSMutableDictionary *(NSMutableDictionary *jsobj) {
+        int result=[[jsobj valueForKey:@"result"] intValue];
+        
+        switch (result) {
+            case 0:
+                [jsobj setValue:MSG_USERAUTH_ERROR forKey:@"err_msg"];
+                break;
+            case 1:
+                [jsobj setValue:MSG_ERROR forKey:@"err_msg"];
+                break;
+            case RESULT_TRUE:
+                [jsobj setValue:MSG_SUCCESS forKey:@"err_msg"];
+                break;
+            case 9:
+                [jsobj setValue:[jsobj valueForKey:@"msg"] forKey:@"err_msg"];
+                break;
+            case RESULT_TIMEOUT:
+                [jsobj setValue:MSG_TIMEOUT forKey:@"err_msg"];
+                break;
+            default:
+                [jsobj setValue:MSG_ERROR forKey:@"err_msg"];
+                break;
+        }
+        
+        return jsobj;
+    } decrypt_handler:^NSMutableDictionary *(NSMutableDictionary *jsobj) {
+        
+        NSString* base64str = jsobj[@"str"];
+        NSString* decryptstr=[AESCrypt AES128Decrypt:base64str key:@"Usai2010"];
+        jsobj=[[RAConvertor string2dict:decryptstr] mutableCopy];
+        return jsobj;
+    }];
+    
+    
+    /*
+     
+     
+     
+     */
+    return nil;
+}
+
++ (NSDictionary *)handleJsonData:(NSData *)jsonData {
+    
+    if (jsonData==nil)
+    {
+        return @{
+                 @"result" : @RESULT_NET_ERROR,
+                 @"err_msg" : MSG_NET_ERROR
+                 };
+    }
+    
+    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableLeaves error:nil];
+    
+    return json;
+    
+}
+
++ (NSDictionary *)requestLogin:(NSString *)user password:(NSString *)pwd {
+    
+
+    return @{
+             @"result" : @(RESULT_TRUE)
+             };
+    
+    NSMutableDictionary *params = [NSMutableDictionary dictionary];
+
+    [params setObject:user forKey:@"user"];
+    [params setObject:pwd forKey:@"password"];
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    
+    return [self handleJsonData:json];
+}
+
++(int) requestRetrievePassword : (NSString*)user  email:(NSString*)email
+{
+    
+    if(![NetworkUtils IsNetworkAvailable])
+        return RESULT_NET_NOTAVAILABLE;
+    NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
+    [params setValue:user forKey:@"user"];
+    [params setValue:email forKey:@"email"];
+    [params setValue:@"Retrieve Password" forKey:@"module_name"];
+    [params setValue:@"handset_search" forKey:@"action"];
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    if (json==nil)
+    {
+        DebugLog(@"json is wrong");
+        return RESULT_NET_ERROR;
+    }
+    
+    NSError *error=nil;
+    NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
+    if(jsobj)
+    {
+        int result = [[jsobj valueForKey:@"result"] intValue];
+        if(result!=AP_USER_AUTH)
+        {
+            DebugLog(@"USER NOT AUTHORIZED CODE=%d ",result);
+            return RESULT_FALSE;
+            
+        }
+        return RESULT_TRUE;
+        
+    }
+    return RESULT_NET_ERROR;
+    
+    
+}
+
++ (NSDictionary *)requestOrderList {
+    
+    return [self loadFakeData:@"fake_order_list.json"];
+    
+    
+    NSMutableDictionary *params = [NSMutableDictionary dictionary];
+    
+//    [params setObject:user forKey:@"user"];
+//    [params setObject:pwd forKey:@"password"];
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    
+    return [self handleJsonData:json];
+}
+
++ (NSDictionary *)requestOrderDetail:(NSString *)orderID {
+    
+    return [self loadFakeData:@"fake_order_detail.json"];
+    
+    NSMutableDictionary *params = [NSMutableDictionary dictionary];
+    
+//    [params setObject:user forKey:@"user"];
+//    [params setObject:pwd forKey:@"password"];
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    
+    return [self handleJsonData:json];
+}
+
++ (NSDictionary *)loadFakeData:(NSString *)fileName {
+    
+    NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:nil];
+    NSData *jsonData = [NSData dataWithContentsOfFile:path];
+    return [self handleJsonData:jsonData];
+}
+
+@end

+ 0 - 15
Redant Drivers/Apex And Drivers/ViewController.h

@@ -1,15 +0,0 @@
-//
-//  ViewController.h
-//  Apex And Drivers
-//
-//  Created by Ray on 2018/5/26.
-//  Copyright © 2018 USAI. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface ViewController : UIViewController
-
-
-@end
-

+ 0 - 29
Redant Drivers/Apex And Drivers/ViewController.m

@@ -1,29 +0,0 @@
-//
-//  ViewController.m
-//  Apex And Drivers
-//
-//  Created by Ray on 2018/5/26.
-//  Copyright © 2018 USAI. All rights reserved.
-//
-
-#import "ViewController.h"
-
-@interface ViewController ()
-
-@end
-
-@implementation ViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view, typically from a nib.
-}
-
-
-- (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-
-@end

+ 15 - 0
Redant Drivers/Apex And Drivers/config.h

@@ -0,0 +1,15 @@
+//
+//  config.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef config_h
+#define config_h
+
+#define URL_ERR_LOG     @""
+#define URL_HOST        @""
+
+#endif /* config_h */

+ 124 - 0
Redant Drivers/Apex And Drivers/const.h

@@ -0,0 +1,124 @@
+//
+//  config.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/1.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef const_h
+#define const_h
+
+#define DEBUGLOG 1
+#ifdef DEBUGLOG
+#ifdef DEBUG
+//     #define DebugLog( s, ... ) fprintf(stderr,"%s\n",[[NSString stringWithFormat:s, ##__VA_ARGS__] UTF8String])//
+#define DebugLog( s, ... ) fprintf(stderr, "<%p %s:(%d)> %s \n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent]UTF8String], __LINE__, [[NSString stringWithFormat:(s), ##__VA_ARGS__]UTF8String] )
+
+#define blockDebugLog( s, ... ) fprintf(stderr, "<%p %s:(%d)> %s \n",weakself, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent]UTF8String], __LINE__, [[NSString stringWithFormat:(s), ##__VA_ARGS__]UTF8String] )
+
+#else
+#define DebugLog( s, ... )
+
+#define blockDebugLog( s, ... )
+#endif
+#else
+#define DebugLog( s, ... )
+
+#define blockDebugLog( s, ... )
+#endif
+
+#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
+
+#define URL_REMOTE 1
+#define URL_LOCAL 0
+#define URL_NONE 2
+#define URL_RESTORE 3
+
+
+
+#define REFRESH_NONE 0
+#define REFRESH_VIEW 1
+#define REFRESH_DATA 2
+
+
+// 如何处理commoneditor action 类型调用的返回值
+#define  ACTION_SAVE_DATA 0
+#define ACTION_FILL_SECTION 1
+
+#define RESULT_BARCODE_ERROR             -50
+
+
+
+//#define RESULT_NET_NOTAVAILABLE -4
+//#define RESULT_NET_ERROR -3
+//#define RESULT_FALSE 0
+//#define RESULT_VER_LOW -15
+
+
+#define MAX_ROW 100
+#define MAX_COLUMN 100
+
+#define        BEHAVIOR_SEARCH                     0
+#define        BEHAVIOR_RESULT                     1
+
+
+#define           AP_USER_AUTH                      1
+#define            AP_USER_NOT_AUTH                  2
+#define            AP_USER_NOT_EXIST                  3
+#define           AP_SESSION_EXPIRED                  4
+
+#define           AP_MESSAGE_NEW                  5
+#define            AP_MESSAGE_NONE                      6
+
+
+//const int        RESULT_FALSE                    = 0;
+//#define        RESULT_TRUE                          -1
+//const int        RESULT_NET_ERROR                = -3;
+//const int        RESULT_NET_NOTAVAILABLE            = -4;
+//#define        RESULT_ERROR                      -5
+//#define        RESULT_LOCALFILE_ERROR              -7
+//#define        RESULT_USERAUTH_ERROR              -9
+//#define        RESULT_UPDATE_USERAUTH_ERROR      -11
+//#define        RESULT_SESSION_EXPIRED              -13
+
+
+
+#define RESULT_FALSE 0
+#define RESULT_NO_RESPONSE -1024
+#define RESULT_TRUE         2
+#define RESULT_NO_EMAIL_ADDRESS      3
+#define RESULT_NET_SERVER_ERR         -111
+#define RESULT_NET_ERROR             -3
+#define RESULT_NET_NOTAVAILABLE          -4
+#define RESULT_ERROR                 -5
+#define RESULT_LOCALFILE_ERROR             -7
+#define RESULT_USERAUTH_ERROR             -9
+#define RESULT_UPDATE_USERAUTH_ERROR     -11
+#define RESULT_SESSION_EXPIRED              -13
+#define RESULT_VER_LOW                   -15
+#define RESULT_BACKEND_CRASH                   -20
+#define RESULT_RESPONSE_ERROR                   -30
+#define RESULT_TIMEOUT                   99
+
+#define RESULT_LOGIN_DEVICE                   -18
+
+#define RESULT_NO_MODEL                   8
+
+
+#define JSON_TIMEOUT 60
+
+
+#define MSG_NET_NOTAVAILABLE @"No available network, please check your network setting."
+#define MSG_NET_ERROR @"Net Error. Cannot connect to server for now. Please retry later."
+#define MSG_USERAUTH_ERROR @"Username or password is incorrect.Please check."
+#define MSG_VER_LOW @"Current App version is out of date, please update to the latest version."
+#define MSG_ERROR @"Connection failed with Server, please email your IT Admin."//@"Some error occured on server."
+#define MSG_SUCCESS @"Success."
+#define MSG_LOGIN_DEVICE @"You are currently signed in on another device. Please check."
+#define MSG_TIMEOUT @"Request timeout."
+
+#define MSG_OFFLINE_SUBMIT @"Offline order will be submitted when you login online mode and sync with server."
+#define TITLE_OFFLINE_SUBMIT @"Offline Submit"
+
+#endif /* config_h */