Эх сурвалжийг харах

1.完成iOS Apex Drivers Message。

Pen Li 7 жил өмнө
parent
commit
ae4818c22c

+ 40 - 0
Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj

@@ -168,6 +168,10 @@
 		42ED62D920F85ADB00E08CCB /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = 42ED62D820F85ADB00E08CCB /* NotificationService.m */; };
 		42ED62D920F85ADB00E08CCB /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = 42ED62D820F85ADB00E08CCB /* NotificationService.m */; };
 		42ED62DD20F85ADB00E08CCB /* RADriversNotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 42ED62D520F85ADB00E08CCB /* RADriversNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		42ED62DD20F85ADB00E08CCB /* RADriversNotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 42ED62D520F85ADB00E08CCB /* RADriversNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		42F0C5D720E20B3F00922442 /* RACameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F0C5D620E20B3E00922442 /* RACameraViewController.m */; };
 		42F0C5D720E20B3F00922442 /* RACameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F0C5D620E20B3E00922442 /* RACameraViewController.m */; };
+		42F624E5214BA4A100B1F012 /* RAMessageViewController+DataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624E4214BA4A100B1F012 /* RAMessageViewController+DataSource.m */; };
+		42F624E8214BA4AF00B1F012 /* RAMessageViewController+Delegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624E7214BA4AF00B1F012 /* RAMessageViewController+Delegate.m */; };
+		42F624EB214BA50D00B1F012 /* RAMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624EA214BA50D00B1F012 /* RAMessageCell.m */; };
+		42F624EE214BA97F00B1F012 /* RAMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624ED214BA97F00B1F012 /* RAMessageModel.m */; };
 		71EAA33320B9571B002F003C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EAA33220B9571B002F003C /* AppDelegate.m */; };
 		71EAA33320B9571B002F003C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EAA33220B9571B002F003C /* AppDelegate.m */; };
 		71EAA33920B9571B002F003C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33720B9571B002F003C /* Main.storyboard */; };
 		71EAA33920B9571B002F003C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33720B9571B002F003C /* Main.storyboard */; };
 		71EAA33B20B95720002F003C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33A20B95720002F003C /* Assets.xcassets */; };
 		71EAA33B20B95720002F003C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 71EAA33A20B95720002F003C /* Assets.xcassets */; };
@@ -501,6 +505,14 @@
 		42ED62DA20F85ADB00E08CCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		42ED62DA20F85ADB00E08CCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		42ED62E220F88B1400E08CCB /* RADriversNotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RADriversNotificationService.entitlements; sourceTree = "<group>"; };
 		42ED62E220F88B1400E08CCB /* RADriversNotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RADriversNotificationService.entitlements; sourceTree = "<group>"; };
 		42F0C5D620E20B3E00922442 /* RACameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACameraViewController.m; sourceTree = "<group>"; };
 		42F0C5D620E20B3E00922442 /* RACameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RACameraViewController.m; sourceTree = "<group>"; };
+		42F624E3214BA4A100B1F012 /* RAMessageViewController+DataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAMessageViewController+DataSource.h"; sourceTree = "<group>"; };
+		42F624E4214BA4A100B1F012 /* RAMessageViewController+DataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAMessageViewController+DataSource.m"; sourceTree = "<group>"; };
+		42F624E6214BA4AF00B1F012 /* RAMessageViewController+Delegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAMessageViewController+Delegate.h"; sourceTree = "<group>"; };
+		42F624E7214BA4AF00B1F012 /* RAMessageViewController+Delegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAMessageViewController+Delegate.m"; sourceTree = "<group>"; };
+		42F624E9214BA50D00B1F012 /* RAMessageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAMessageCell.h; sourceTree = "<group>"; };
+		42F624EA214BA50D00B1F012 /* RAMessageCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAMessageCell.m; sourceTree = "<group>"; };
+		42F624EC214BA97F00B1F012 /* RAMessageModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAMessageModel.h; sourceTree = "<group>"; };
+		42F624ED214BA97F00B1F012 /* RAMessageModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAMessageModel.m; sourceTree = "<group>"; };
 		71EAA32E20B9571B002F003C /* Apex And Drivers.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Apex And Drivers.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		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>"; };
 		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>"; };
 		71EAA33220B9571B002F003C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -1027,8 +1039,14 @@
 		42D7B073214794420046FE89 /* Message */ = {
 		42D7B073214794420046FE89 /* Message */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				42F624E2214BA48000B1F012 /* Cell */,
+				42F624E1214BA47A00B1F012 /* Model */,
 				42D7B0772147946D0046FE89 /* RAMessageViewController.h */,
 				42D7B0772147946D0046FE89 /* RAMessageViewController.h */,
 				42D7B0782147946D0046FE89 /* RAMessageViewController.m */,
 				42D7B0782147946D0046FE89 /* RAMessageViewController.m */,
+				42F624E3214BA4A100B1F012 /* RAMessageViewController+DataSource.h */,
+				42F624E4214BA4A100B1F012 /* RAMessageViewController+DataSource.m */,
+				42F624E6214BA4AF00B1F012 /* RAMessageViewController+Delegate.h */,
+				42F624E7214BA4AF00B1F012 /* RAMessageViewController+Delegate.m */,
 				42D7B07C2147953D0046FE89 /* message.storyboard */,
 				42D7B07C2147953D0046FE89 /* message.storyboard */,
 			);
 			);
 			path = Message;
 			path = Message;
@@ -1190,6 +1208,24 @@
 			path = RADriversNotificationService;
 			path = RADriversNotificationService;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
+		42F624E1214BA47A00B1F012 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				42F624EC214BA97F00B1F012 /* RAMessageModel.h */,
+				42F624ED214BA97F00B1F012 /* RAMessageModel.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		42F624E2214BA48000B1F012 /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				42F624E9214BA50D00B1F012 /* RAMessageCell.h */,
+				42F624EA214BA50D00B1F012 /* RAMessageCell.m */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
 		71EAA32520B9571B002F003C = {
 		71EAA32520B9571B002F003C = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -1454,6 +1490,7 @@
 				4255EC7420C5096400E5DA24 /* RAOrderEditViewController.m in Sources */,
 				4255EC7420C5096400E5DA24 /* RAOrderEditViewController.m in Sources */,
 				42ECE182214A04BE00AD8283 /* RASettingAboutModel.m in Sources */,
 				42ECE182214A04BE00AD8283 /* RASettingAboutModel.m in Sources */,
 				4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */,
 				4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */,
+				42F624E5214BA4A100B1F012 /* RAMessageViewController+DataSource.m in Sources */,
 				420D111B2133F07B00149B37 /* RAOrderFilterInputCell.m in Sources */,
 				420D111B2133F07B00149B37 /* RAOrderFilterInputCell.m in Sources */,
 				4205FD6120C135CF00DB42B4 /* RAHomeViewController.m in Sources */,
 				4205FD6120C135CF00DB42B4 /* RAHomeViewController.m in Sources */,
 				4205FD7220C1465400DB42B4 /* RAHomeOrderModel.m in Sources */,
 				4205FD7220C1465400DB42B4 /* RAHomeOrderModel.m in Sources */,
@@ -1482,6 +1519,7 @@
 				425B97E220C7BC4A00B35713 /* RAUploadListViewController.m in Sources */,
 				425B97E220C7BC4A00B35713 /* RAUploadListViewController.m in Sources */,
 				4235FABB213E644A000B6672 /* RADetailSignatureCell.m in Sources */,
 				4235FABB213E644A000B6672 /* RADetailSignatureCell.m in Sources */,
 				42D8B8B120C2462D001C125F /* RADetailMultLineCell.m in Sources */,
 				42D8B8B120C2462D001C125F /* RADetailMultLineCell.m in Sources */,
+				42F624E8214BA4AF00B1F012 /* RAMessageViewController+Delegate.m in Sources */,
 				42810FF120E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m in Sources */,
 				42810FF120E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m in Sources */,
 				420D11212133F38500149B37 /* RAOrderFilterBaseCell.m in Sources */,
 				420D11212133F38500149B37 /* RAOrderFilterBaseCell.m in Sources */,
 				4280034120C0F146004D4F50 /* AESCrypt.m in Sources */,
 				4280034120C0F146004D4F50 /* AESCrypt.m in Sources */,
@@ -1508,6 +1546,7 @@
 				4255EC9620C5284C00E5DA24 /* RAEditLabelModel.m in Sources */,
 				4255EC9620C5284C00E5DA24 /* RAEditLabelModel.m in Sources */,
 				425B97ED20C7C35C00B35713 /* ApexDriverUploadCell.m in Sources */,
 				425B97ED20C7C35C00B35713 /* ApexDriverUploadCell.m in Sources */,
 				42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */,
 				42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */,
+				42F624EE214BA97F00B1F012 /* RAMessageModel.m in Sources */,
 				420D110C2133EED100149B37 /* RAOrderFilterStatusModel.m in Sources */,
 				420D110C2133EED100149B37 /* RAOrderFilterStatusModel.m in Sources */,
 				4255EC9920C5285C00E5DA24 /* RAEditInputModel.m in Sources */,
 				4255EC9920C5285C00E5DA24 /* RAEditInputModel.m in Sources */,
 				4235FABE213E6512000B6672 /* RADetailSignatureModel.m in Sources */,
 				4235FABE213E6512000B6672 /* RADetailSignatureModel.m in Sources */,
@@ -1518,6 +1557,7 @@
 				425959772148F35A00F7DD41 /* RASettingBaseModel.m in Sources */,
 				425959772148F35A00F7DD41 /* RASettingBaseModel.m in Sources */,
 				4235FAB6213E30CC000B6672 /* RAEditImageBaseModel.m in Sources */,
 				4235FAB6213E30CC000B6672 /* RAEditImageBaseModel.m in Sources */,
 				4281100320E4D47000315156 /* JLRefreshBasis.m in Sources */,
 				4281100320E4D47000315156 /* JLRefreshBasis.m in Sources */,
+				42F624EB214BA50D00B1F012 /* RAMessageCell.m in Sources */,
 				420D11182133F06900149B37 /* RAOrderFilterStatusCell.m in Sources */,
 				420D11182133F06900149B37 /* RAOrderFilterStatusCell.m in Sources */,
 				4255EC7920C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m in Sources */,
 				4255EC7920C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m in Sources */,
 				42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */,
 				42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */,

+ 16 - 16
Redant Drivers/Apex And Drivers/Home/Home.storyboard

@@ -33,10 +33,10 @@
                                                     <rect key="frame" x="5" y="5" width="365" height="130"/>
                                                     <rect key="frame" x="5" y="5" width="365" height="130"/>
                                                     <subviews>
                                                     <subviews>
                                                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="V2e-NM-tUq">
                                                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="V2e-NM-tUq">
-                                                            <rect key="frame" x="10" y="47" width="70" height="70"/>
+                                                            <rect key="frame" x="10" y="52" width="60" height="60"/>
                                                             <constraints>
                                                             <constraints>
-                                                                <constraint firstAttribute="height" constant="70" id="fW9-0H-jGG"/>
-                                                                <constraint firstAttribute="width" constant="70" id="pcF-Ms-1eF"/>
+                                                                <constraint firstAttribute="height" constant="60" id="fW9-0H-jGG"/>
+                                                                <constraint firstAttribute="width" constant="60" id="pcF-Ms-1eF"/>
                                                             </constraints>
                                                             </constraints>
                                                         </imageView>
                                                         </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">
                                                         <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">
@@ -49,16 +49,16 @@
                                                             <nil key="highlightedColor"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         </label>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0oy-zO-2fZ">
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0oy-zO-2fZ">
-                                                            <rect key="frame" x="85" y="34" width="275" height="96"/>
+                                                            <rect key="frame" x="75" y="34" width="285" height="96"/>
                                                             <subviews>
                                                             <subviews>
                                                                 <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">
                                                                 <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="40" y="69" width="235" height="17"/>
+                                                                    <rect key="frame" x="40" y="69" width="245" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </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">
                                                                 <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="73" y="0.0" width="202" height="17"/>
+                                                                    <rect key="frame" x="73" y="0.0" width="212" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
@@ -82,7 +82,7 @@
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </label>
                                                                 <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="Utf-Vm-dJV">
                                                                 <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="Utf-Vm-dJV">
-                                                                    <rect key="frame" x="81.5" y="44" width="193.5" height="17"/>
+                                                                    <rect key="frame" x="81.5" y="44" width="203.5" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
@@ -97,7 +97,7 @@
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </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">
                                                                 <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="98" y="22" width="177" height="17"/>
+                                                                    <rect key="frame" x="98" y="22" width="187" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
@@ -229,10 +229,10 @@
                                                     <rect key="frame" x="5" y="5" width="365" height="130"/>
                                                     <rect key="frame" x="5" y="5" width="365" height="130"/>
                                                     <subviews>
                                                     <subviews>
                                                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="r8P-b3-SYP">
                                                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="r8P-b3-SYP">
-                                                            <rect key="frame" x="10" y="47" width="70" height="70"/>
+                                                            <rect key="frame" x="10" y="52" width="60" height="60"/>
                                                             <constraints>
                                                             <constraints>
-                                                                <constraint firstAttribute="width" constant="70" id="E4g-9T-EpV"/>
-                                                                <constraint firstAttribute="height" constant="70" id="z9o-Ex-Ffd"/>
+                                                                <constraint firstAttribute="width" constant="60" id="E4g-9T-EpV"/>
+                                                                <constraint firstAttribute="height" constant="60" id="z9o-Ex-Ffd"/>
                                                             </constraints>
                                                             </constraints>
                                                         </imageView>
                                                         </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="6qD-i1-tev">
                                                         <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="6qD-i1-tev">
@@ -252,16 +252,16 @@
                                                             </constraints>
                                                             </constraints>
                                                         </imageView>
                                                         </imageView>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iT9-Mg-UwI">
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iT9-Mg-UwI">
-                                                            <rect key="frame" x="85" y="34" width="275" height="96"/>
+                                                            <rect key="frame" x="75" y="34" width="285" height="96"/>
                                                             <subviews>
                                                             <subviews>
                                                                 <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="Z8k-hS-sOz">
                                                                 <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="Z8k-hS-sOz">
-                                                                    <rect key="frame" x="40" y="69" width="235" height="17"/>
+                                                                    <rect key="frame" x="40" y="69" width="245" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </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="hNu-AY-bfS">
                                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AFS180530001200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hNu-AY-bfS">
-                                                                    <rect key="frame" x="73" y="0.0" width="202" height="17"/>
+                                                                    <rect key="frame" x="73" y="0.0" width="212" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
@@ -285,7 +285,7 @@
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </label>
                                                                 <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="1vU-Ly-MVu">
                                                                 <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="1vU-Ly-MVu">
-                                                                    <rect key="frame" x="81.5" y="44" width="193.5" height="17"/>
+                                                                    <rect key="frame" x="81.5" y="44" width="203.5" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
@@ -300,7 +300,7 @@
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                 </label>
                                                                 </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="Kd7-FH-8p2">
                                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TCNU6432476" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kd7-FH-8p2">
-                                                                    <rect key="frame" x="98" y="22" width="177" height="17"/>
+                                                                    <rect key="frame" x="98" y="22" width="187" height="17"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="textColor"/>
                                                                     <nil key="highlightedColor"/>
                                                                     <nil key="highlightedColor"/>

+ 11 - 7
Redant Drivers/Apex And Drivers/Login/Login.storyboard

@@ -6,6 +6,7 @@
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
@@ -23,7 +24,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qCw-s3-fQH">
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qCw-s3-fQH">
-                                <rect key="frame" x="0.0" y="178" width="375" height="140"/>
+                                <rect key="frame" x="0.0" y="231.5" width="375" height="140"/>
                                 <subviews>
                                 <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">
                                     <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="10" width="335" height="30"/>
                                         <rect key="frame" x="20" y="10" width="335" height="30"/>
@@ -64,7 +65,7 @@
                                         <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
                                         <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
                                     </activityIndicatorView>
                                     </activityIndicatorView>
                                 </subviews>
                                 </subviews>
-                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                 <constraints>
                                     <constraint firstItem="9gC-X8-VVb" firstAttribute="width" secondItem="VlU-9K-g4X" secondAttribute="width" id="1rw-dl-JUG"/>
                                     <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="leading" secondItem="qCw-s3-fQH" secondAttribute="leading" constant="20" id="29G-qP-j9S"/>
@@ -82,11 +83,14 @@
                                 </constraints>
                                 </constraints>
                             </view>
                             </view>
                             <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="driver_logo" translatesAutoresizingMaskIntoConstraints="NO" id="uPR-4Z-qVR">
                             <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="driver_logo" translatesAutoresizingMaskIntoConstraints="NO" id="uPR-4Z-qVR">
-                                <rect key="frame" x="20" y="49" width="335" height="109"/>
+                                <rect key="frame" x="20" y="67" width="335" height="144.5"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="uPR-4Z-qVR" secondAttribute="height" multiplier="253:109" id="fsr-jT-3hX"/>
+                                </constraints>
                                 <inset key="insetFor6xAndEarlier" minX="0.0" minY="40" maxX="0.0" maxY="-40"/>
                                 <inset key="insetFor6xAndEarlier" minX="0.0" minY="40" maxX="0.0" maxY="-40"/>
                             </imageView>
                             </imageView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4nB-rd-0CZ">
                             <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="343" width="172" height="30"/>
+                                <rect key="frame" x="183" y="396.5" width="172" height="30"/>
                                 <constraints>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="172" id="ROU-8P-HXY"/>
                                     <constraint firstAttribute="width" constant="172" id="ROU-8P-HXY"/>
                                 </constraints>
                                 </constraints>
@@ -107,15 +111,15 @@
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="centerX" secondItem="jSh-rY-8BJ" secondAttribute="centerX" id="5pf-lB-Mm4"/>
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="centerX" secondItem="jSh-rY-8BJ" secondAttribute="centerX" id="5pf-lB-Mm4"/>
                             <constraint firstItem="4nB-rd-0CZ" firstAttribute="top" secondItem="qCw-s3-fQH" secondAttribute="bottom" constant="25" id="6o9-jZ-S21"/>
                             <constraint firstItem="4nB-rd-0CZ" firstAttribute="top" secondItem="qCw-s3-fQH" secondAttribute="bottom" constant="25" id="6o9-jZ-S21"/>
                             <constraint firstItem="hEP-az-ldq" firstAttribute="top" secondItem="6Mm-eS-rAo" secondAttribute="bottom" constant="10" id="8mY-tL-gaO"/>
                             <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="top" secondItem="uPR-4Z-qVR" secondAttribute="bottom" constant="20" id="D17-Cv-ElT"/>
+                            <constraint firstItem="uPR-4Z-qVR" firstAttribute="top" secondItem="hEP-az-ldq" secondAttribute="bottom" constant="20" id="AdB-h2-R13"/>
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="trailing" secondItem="VlU-9K-g4X" secondAttribute="trailing" id="H1m-mE-RTg"/>
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="trailing" secondItem="VlU-9K-g4X" secondAttribute="trailing" id="H1m-mE-RTg"/>
                             <constraint firstItem="qCw-s3-fQH" firstAttribute="width" secondItem="jSh-rY-8BJ" secondAttribute="width" id="MS5-9p-o7T"/>
                             <constraint firstItem="qCw-s3-fQH" firstAttribute="width" secondItem="jSh-rY-8BJ" secondAttribute="width" id="MS5-9p-o7T"/>
-                            <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="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="hEP-az-ldq" firstAttribute="leading" secondItem="jSh-rY-8BJ" secondAttribute="leading" constant="20" id="OwY-VO-t5P"/>
-                            <constraint firstItem="KzV-Ny-317" firstAttribute="top" relation="greaterThanOrEqual" secondItem="4nB-rd-0CZ" secondAttribute="bottom" constant="210" id="Sr3-MZ-z0k"/>
+                            <constraint firstItem="KzV-Ny-317" firstAttribute="top" relation="greaterThanOrEqual" secondItem="4nB-rd-0CZ" secondAttribute="bottom" constant="5" id="Sr3-MZ-z0k"/>
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="leading" secondItem="VlU-9K-g4X" secondAttribute="leading" id="VBn-UB-gKO"/>
                             <constraint firstItem="uPR-4Z-qVR" firstAttribute="leading" secondItem="VlU-9K-g4X" secondAttribute="leading" id="VBn-UB-gKO"/>
                             <constraint firstItem="4nB-rd-0CZ" firstAttribute="trailing" secondItem="9gC-X8-VVb" secondAttribute="trailing" id="iXl-Es-zfd"/>
                             <constraint firstItem="4nB-rd-0CZ" firstAttribute="trailing" secondItem="9gC-X8-VVb" secondAttribute="trailing" id="iXl-Es-zfd"/>
+                            <constraint firstItem="qCw-s3-fQH" firstAttribute="top" secondItem="uPR-4Z-qVR" secondAttribute="bottom" constant="20" id="ma6-ER-qXY"/>
                         </constraints>
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="eN5-fH-f6F"/>
                         <viewLayoutGuide key="safeArea" id="eN5-fH-f6F"/>
                     </view>
                     </view>

+ 16 - 0
Redant Drivers/Apex And Drivers/Message/Cell/RAMessageCell.h

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

+ 60 - 0
Redant Drivers/Apex And Drivers/Message/Cell/RAMessageCell.m

@@ -0,0 +1,60 @@
+//
+//  RAMessageCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/9/14.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAMessageCell.h"
+#import "RAMessageModel.h"
+
+@interface RAMessageCell () <RAMessageDelegate>
+
+@property (nonatomic,strong) IBOutlet UILabel *titleLabel;
+@property (nonatomic,strong) IBOutlet UILabel *detailLabel;
+@property (nonatomic,strong) IBOutlet UILabel *dateLabel;
+@property (nonatomic,strong) IBOutlet UIImageView *markView;
+
+
+@end
+
+@implementation RAMessageCell
+
+- (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:(RAMessageModel *)model {
+    if (_model) {
+        _model.delegate = nil;
+    }
+    _model = model;
+    if (_model) {
+        _model.delegate = self;
+    }
+    
+    [self refreshUI];
+}
+
+- (void)refreshUI {
+    self.titleLabel.text = self.model.title;
+    self.detailLabel.text = self.model.message;
+    self.dateLabel.text = self.model.date;
+    self.markView.hidden = !self.model.isNew;
+}
+
+@end

+ 33 - 0
Redant Drivers/Apex And Drivers/Message/Model/RAMessageModel.h

@@ -0,0 +1,33 @@
+//
+//  RAMessageModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/9/14.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol RAMessageDelegate <NSObject>
+
+@optional
+- (void)refreshUI;
+
+@end
+
+@interface RAMessageModel : NSObject
+
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,copy) NSString *message;
+@property (nonatomic,copy) NSString *date;
+@property (nonatomic,assign) BOOL isNew;
+
+@property (nonatomic,copy) NSString *orderID;
+@property (nonatomic,copy) NSString *orderType2;
+@property (nonatomic,copy) NSString *statusNo;
+@property (nonatomic,assign) NSInteger orderType;
+
+@property (nonatomic,assign,readonly) CGFloat height;
+@property (nonatomic,weak) id<RAMessageDelegate> delegate;
+
+@end

+ 25 - 0
Redant Drivers/Apex And Drivers/Message/Model/RAMessageModel.m

@@ -0,0 +1,25 @@
+//
+//  RAMessageModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/9/14.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAMessageModel.h"
+
+@implementation RAMessageModel
+
+- (void)setIsNew:(BOOL)isNew {
+    _isNew = isNew;
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(refreshUI)]) {
+        [self.delegate refreshUI];
+    }
+}
+
+- (CGFloat)height {
+    return 67.0f;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Message/RAMessageViewController+DataSource.h

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

+ 28 - 0
Redant Drivers/Apex And Drivers/Message/RAMessageViewController+DataSource.m

@@ -0,0 +1,28 @@
+//
+//  RAMessageViewController+DataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/9/14.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAMessageViewController+DataSource.h"
+#import "RAMessageCell.h"
+#import "RAMessageModel.h"
+
+@implementation RAMessageViewController (DataSource)
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.messages.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAMessageCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAMessageCell" forIndexPath:indexPath];
+    RAMessageModel *model = [self.messages objectAtIndex:indexPath.row];
+    cell.model = model;
+    
+    return cell;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Message/RAMessageViewController+Delegate.h

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

+ 33 - 0
Redant Drivers/Apex And Drivers/Message/RAMessageViewController+Delegate.m

@@ -0,0 +1,33 @@
+//
+//  RAMessageViewController+Delegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/9/14.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAMessageViewController+Delegate.h"
+#import "RAMessageModel.h"
+#import "RAOrderDetailViewController.h"
+
+@implementation RAMessageViewController (Delegate)
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAMessageModel *model = [self.messages objectAtIndex:indexPath.row];
+    return model.height;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    RAMessageModel *model = [self.messages objectAtIndex:indexPath.row];
+    model.isNew = NO;
+    
+    RAOrderDetailViewController *detailVC = [RAOrderDetailViewController viewControllerFromStoryboard];
+    detailVC.orderID = model.orderID;
+    detailVC.orderType = model.orderType;
+    detailVC.orderType2 = model.orderType2;
+    detailVC.status_no = model.statusNo;
+    [self.navigationController pushViewController:detailVC animated:YES];
+}
+
+@end

+ 4 - 0
Redant Drivers/Apex And Drivers/Message/RAMessageViewController.h

@@ -8,6 +8,10 @@
 
 
 #import "RABaseViewController.h"
 #import "RABaseViewController.h"
 
 
+@class RAMessageModel;
 @interface RAMessageViewController : RABaseViewController
 @interface RAMessageViewController : RABaseViewController
 
 
+@property (nonatomic,strong,readonly) UITableView *tableView;
+@property (nonatomic,strong,readonly) NSArray<RAMessageModel *> *messages;
+
 @end
 @end

+ 195 - 8
Redant Drivers/Apex And Drivers/Message/RAMessageViewController.m

@@ -7,8 +7,29 @@
 //
 //
 
 
 #import "RAMessageViewController.h"
 #import "RAMessageViewController.h"
+#import "RAProgressHUD.h"
+#import "UIScrollView+Empty.h"
+#import "RAMessageModel.h"
+#import "JLRefreshFooter.h"
+#import "RAEmptyView.h"
 
 
-@interface RAMessageViewController ()
+static const NSInteger limit = 20;
+
+typedef enum {
+    
+    LoadDataActionTypeInitial,
+    LoadDataActionTypeReLoad,
+    LoadDataActionTypeLoadMore
+    
+} LoadDataActionType;
+
+@interface RAMessageViewController ()<JLRefreshDelegate>
+
+@property (nonatomic,strong) IBOutlet UITableView *messageTableView;
+
+@property (nonatomic,strong) UIRefreshControl *refreshControl;
+@property (nonatomic,strong) NSMutableArray<RAMessageModel *> *messageArray;
+@property (nonatomic,strong) JLRefreshFooter *refreshFooter;
 
 
 @end
 @end
 
 
@@ -23,6 +44,10 @@
 - (void)viewDidLoad {
 - (void)viewDidLoad {
     [super viewDidLoad];
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     // Do any additional setup after loading the view.
+    
+    [self configTableView];
+    
+    [self loadData];
 }
 }
 
 
 - (void)didReceiveMemoryWarning {
 - (void)didReceiveMemoryWarning {
@@ -30,14 +55,176 @@
     // Dispose of any resources that can be recreated.
     // Dispose of any resources that can be recreated.
 }
 }
 
 
-/*
-#pragma mark - Navigation
+#pragma mark - Config
+
+- (void)configTableView {
+    
+    if (@available(iOS 11,*)) {
+        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    } else {
+        self.automaticallyAdjustsScrollViewInsets = NO;
+    }
+    self.tableView.tableFooterView = [UIView new];
+    self.tableView.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1];
+    
+    UIRefreshControl *refresh = [[UIRefreshControl alloc] init];
+    [refresh addTarget:self action:@selector(refreshControlValueChanged:) forControlEvents:UIControlEventValueChanged];
+    [self.tableView addSubview:refresh];
+    self.refreshControl = refresh;
+    
+    self.refreshFooter = [[JLRefreshFooter alloc] init];
+    self.refreshFooter.refreshDelegate = self;
+    self.tableView.jl_footer = self.refreshFooter;
+    
+    // empty
+    __weak typeof(self) weakSelf = self;
+    self.tableView.emptyView = [RAEmptyView emptyViewWithTapBlk:^(id sender) {
+        [weakSelf loadData];
+    }];
+}
+
+#pragma mark - Getter
+
+- (UITableView *)tableView {
+    return self.messageTableView;
+}
+
+- (NSArray *)messages {
+    return self.messageArray;
+}
+
+- (NSMutableArray<RAMessageModel *> *)messageArray {
+    if (!_messageArray) {
+        _messageArray = [NSMutableArray array];
+    }
+    return _messageArray;
+}
+
+- (NSUInteger)messageCount {
+    return self.messageArray.count;
+}
+
+#pragma mark - Action
+
+- (void)refreshControlValueChanged:(UIRefreshControl *)refresh {
+    [self reloadData];
+}
+
+#pragma mark - Data
+
+- (void)loadData:(LoadDataActionType)actionType {
+    
+    if (self.loading) {
+        return;
+    }
+    self.loading = YES;
+    
+    [self.tableView hideEmpty];
+    
+    NSInteger offset = 0;
+    if (actionType == LoadDataActionTypeLoadMore) {
+        offset = [self messageCount];
+    }
+    
+    // show progress
+    RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
+    
+    __weak typeof(self) weakSelf = self;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        
+        NSDictionary *json = [RADataProvider requestMessage:offset limit:limit];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            
+            // dismiss progress
+            [hud dismiss];
+            if (weakSelf.refreshControl.isRefreshing) {
+                [weakSelf.refreshControl endRefreshing];
+            }
+            
+            if (weakSelf) {
+                __strong typeof(weakSelf) strongSelf = weakSelf;
+                
+                if (actionType == LoadDataActionTypeLoadMore) {
+                    [strongSelf.refreshFooter performSelector:@selector(endRefresh)];
+                }
+                
+                int result = [[json objectForKey:@"result"] intValue];
+                if (result == RESULT_TRUE) {
+                    
+                    NSArray *messages = [json objectForKey:@"messages"];
+                    
+                    if (actionType != LoadDataActionTypeLoadMore) {
+                        [strongSelf.messageArray removeAllObjects];
+                    } else {
+                        if (messages.count < limit) {
+                            [strongSelf.refreshFooter performSelector:@selector(noMoreData)];
+                        }
+                    }
+                    
+                    for (int i = 0; i < messages.count; i++) {
+                        NSDictionary *msg = [messages objectAtIndex:i];
+                        RAMessageModel *model = [RAMessageModel new];
+                        [model setValuesForKeysWithDictionary:msg];
+                        [strongSelf.messageArray addObject:model];
+                    }
+                    
+                    [strongSelf.tableView reloadData];
+                    
+                } else {
+                    
+                    [strongSelf.messageArray removeAllObjects];
+                    strongSelf.tableView.contentOffset = CGPointZero;
+                    [strongSelf.tableView reloadData];
+                    
+                    // process error
+                    NSString *msg = [json objectForKey:@"err_msg"];
+                    //                    [strongSelf showAlert:msg];
+                    [strongSelf showAlertTilte:@"Warning" message:msg];
+                }
+            }
+            
+            weakSelf.loading = NO;
+            
+            if ([weakSelf messageCount] == 0) {
+                [weakSelf.tableView showEmpty];
+            } else {
+                [weakSelf.tableView hideEmpty];
+            }
+        });
+        
+    });
+}
+
+- (void)loadData {
+    [self loadData:LoadDataActionTypeInitial];
+}
+
+- (void)reloadData {
+    [self loadData:LoadDataActionTypeReLoad];
+}
+
+- (void)loadMore {
+    [self loadData:LoadDataActionTypeLoadMore];
+}
+
+#pragma mark - Refresh Delegate
+
+- (void)jl_beginRefresh:(JLRefreshBasis *)refresh {
+    
+    if (refresh == self.refreshFooter) {
+        if(refresh.state==JLRefreshStateNoMore) //数据取完不再加载
+            return;
+        [self loadMore];
+    }
+}
+
+- (void)jl_pullRefresh:(JLRefreshBasis *)refresh state:(JLRefreshState)state percentage:(float)percentage {
+    
+}
 
 
-// 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.
+- (void)jl_endRefresh:(JLRefreshBasis *)refresh {
+    
 }
 }
-*/
 
 
 @end
 @end

+ 77 - 0
Redant Drivers/Apex And Drivers/Message/message.storyboard

@@ -17,13 +17,90 @@
                     <view key="view" contentMode="scaleToFill" id="tnD-pT-LaF">
                     <view key="view" contentMode="scaleToFill" id="tnD-pT-LaF">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <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="fqf-M3-jhe">
+                                <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="RAMessageCell" rowHeight="67" id="LDz-Uo-T6a" customClass="RAMessageCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="67"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LDz-Uo-T6a" id="nwB-Uz-wxj">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="66.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="you have a new order" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zbt-dA-VVv">
+                                                    <rect key="frame" x="10" y="10" width="265.5" height="20.5"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="AFS20180530001200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uy9-IU-SO3">
+                                                    <rect key="frame" x="10" y="35.5" width="355" height="21.5"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="backend_flag" translatesAutoresizingMaskIntoConstraints="NO" id="bdr-H1-5A5">
+                                                    <rect key="frame" x="355" y="5" width="15" height="15"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="15" id="2iV-h7-smd"/>
+                                                        <constraint firstAttribute="width" constant="15" id="s0l-qp-X9v"/>
+                                                    </constraints>
+                                                </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="09/13/2018" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LVR-iU-IbF">
+                                                    <rect key="frame" x="285.5" y="6" width="64.5" height="14.5"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="zbt-dA-VVv" firstAttribute="leading" secondItem="nwB-Uz-wxj" secondAttribute="leading" constant="10" id="0jr-Qd-g8I"/>
+                                                <constraint firstItem="bdr-H1-5A5" firstAttribute="top" secondItem="nwB-Uz-wxj" secondAttribute="top" constant="5" id="8yZ-Vw-WuC"/>
+                                                <constraint firstItem="Uy9-IU-SO3" firstAttribute="leading" secondItem="zbt-dA-VVv" secondAttribute="leading" id="NXX-FZ-j6O"/>
+                                                <constraint firstItem="bdr-H1-5A5" firstAttribute="leading" secondItem="LVR-iU-IbF" secondAttribute="trailing" constant="5" id="PBU-9L-e9T"/>
+                                                <constraint firstItem="Uy9-IU-SO3" firstAttribute="top" secondItem="zbt-dA-VVv" secondAttribute="bottom" constant="5" id="PaW-bs-uhj"/>
+                                                <constraint firstItem="LVR-iU-IbF" firstAttribute="centerY" secondItem="bdr-H1-5A5" secondAttribute="centerY" id="Qju-Jo-HJb"/>
+                                                <constraint firstAttribute="trailing" secondItem="Uy9-IU-SO3" secondAttribute="trailing" constant="10" id="VTE-ge-ous"/>
+                                                <constraint firstItem="LVR-iU-IbF" firstAttribute="leading" secondItem="zbt-dA-VVv" secondAttribute="trailing" constant="10" id="bEd-Pb-FUF"/>
+                                                <constraint firstAttribute="trailing" secondItem="bdr-H1-5A5" secondAttribute="trailing" constant="5" id="mZr-HU-J8L"/>
+                                                <constraint firstItem="zbt-dA-VVv" firstAttribute="top" secondItem="nwB-Uz-wxj" secondAttribute="top" constant="10" id="sNs-0p-fq0"/>
+                                                <constraint firstAttribute="bottom" secondItem="Uy9-IU-SO3" secondAttribute="bottom" constant="10" id="v7O-Gf-BuC"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="dateLabel" destination="LVR-iU-IbF" id="kZb-8g-Xum"/>
+                                            <outlet property="detailLabel" destination="Uy9-IU-SO3" id="8EQ-DF-Qax"/>
+                                            <outlet property="markView" destination="bdr-H1-5A5" id="sev-Zg-7hD"/>
+                                            <outlet property="titleLabel" destination="zbt-dA-VVv" id="Man-ZN-5ix"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="5yA-KC-iwJ" id="6JQ-Lb-49q"/>
+                                    <outlet property="delegate" destination="5yA-KC-iwJ" id="nqp-Ew-NVC"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="fqf-M3-jhe" firstAttribute="leading" secondItem="DqC-qh-2uh" secondAttribute="leading" id="CVx-gL-mkw"/>
+                            <constraint firstItem="fqf-M3-jhe" firstAttribute="top" secondItem="DqC-qh-2uh" secondAttribute="top" id="iME-9S-cnA"/>
+                            <constraint firstItem="DqC-qh-2uh" firstAttribute="trailing" secondItem="fqf-M3-jhe" secondAttribute="trailing" id="mdz-a6-heA"/>
+                            <constraint firstItem="DqC-qh-2uh" firstAttribute="bottom" secondItem="fqf-M3-jhe" secondAttribute="bottom" id="yyH-L0-TTW"/>
+                        </constraints>
                         <viewLayoutGuide key="safeArea" id="DqC-qh-2uh"/>
                         <viewLayoutGuide key="safeArea" id="DqC-qh-2uh"/>
                     </view>
                     </view>
+                    <connections>
+                        <outlet property="messageTableView" destination="fqf-M3-jhe" id="qcd-Gr-BQJ"/>
+                    </connections>
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="9lF-s7-t8P" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="9lF-s7-t8P" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
             <point key="canvasLocation" x="154" y="-265"/>
             <point key="canvasLocation" x="154" y="-265"/>
         </scene>
         </scene>
     </scenes>
     </scenes>
+    <resources>
+        <image name="backend_flag" width="20" height="20"/>
+    </resources>
 </document>
 </document>