Bläddra i källkod

去掉appdelegate 无用的didroutated 函数

Ray Zhang 8 år sedan
förälder
incheckning
49e07aaa19

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


BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 3
RedAnt ERP Mobile/common/ActiveViewController.m

@@ -55,9 +55,9 @@
 }
 -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-    UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-    [appDelegate didRotated];
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    [appDelegate didRotated];
     
 //    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
 //    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))

+ 1 - 1
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -8,7 +8,7 @@
 
 #import "CommonEditorViewController.h"
 #import "CommonEditorCellEdit.h"
-#import "iSalesNetwork.h"
+#import "NetworkUtils.h"
 #import "CommonEditorCellEnum.h"
 #import "CommonEditorCellSwitch.h"
 #import "CommonEditorCellModel.h"

+ 4 - 4
RedAnt ERP Mobile/common/CommonEditor/EnumSelectViewController.m

@@ -145,10 +145,10 @@
 {
     
     [self.tableEnum reloadData];
-    
-    UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-    [appDelegate didRotated];
+//    
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    [appDelegate didRotated];
     
     
     

+ 2 - 2
RedAnt ERP Mobile/common/customUI/ImageScrollerViewController.m

@@ -18,8 +18,8 @@
 -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
     UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-    [appDelegate didRotated];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    [appDelegate didRotated];
     UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
     if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
     {

+ 3 - 3
RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m

@@ -32,9 +32,9 @@
 
 -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-    UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-    [appDelegate didRotated];
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    [appDelegate didRotated];
     
     //    [CATransaction begin];
     //    [CATransaction setAnimationDuration:0.5];

+ 1 - 1
RedAnt ERP Mobile/iSales-GATIT/AppDelegate.h

@@ -123,7 +123,7 @@
 @property int api_Status;
 @property (strong, nonatomic) NSString* Status_Text;
 
--(void) didRotated;
+//-(void) didRotated;
 
 // scanner test
 -(void) test_onDecodedDataResult:(NSString*) value;

+ 4 - 4
RedAnt ERP Mobile/iSales-GATIT/AppDelegate.m

@@ -2833,10 +2833,10 @@ void UncaughtExceptionHandler(NSException *exception) {
         //        }
     }
 }
--(void) didRotated
-{
-    
-}
+//-(void) didRotated
+//{
+//    
+//}
 
 
 /**

+ 1 - 1
RedAnt ERP Mobile/iSales-HOMER/AppDelegate.h

@@ -123,7 +123,7 @@
 @property int api_Status;
 @property (strong, nonatomic) NSString* Status_Text;
 
--(void) didRotated;
+//-(void) didRotated;
 
 // scanner test
 -(void) test_onDecodedDataResult:(NSString*) value;

+ 4 - 4
RedAnt ERP Mobile/iSales-HOMER/AppDelegate.m

@@ -2840,10 +2840,10 @@ void UncaughtExceptionHandler(NSException *exception) {
         //        }
     }
 }
--(void) didRotated
-{
-    
-}
+//-(void) didRotated
+//{
+//    
+//}
 
 
 /**

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/AppDelegate.h

@@ -123,7 +123,7 @@
 @property int api_Status;
 @property (strong, nonatomic) NSString* Status_Text;
 
--(void) didRotated;
+//-(void) didRotated;
 
 // scanner test
 -(void) test_onDecodedDataResult:(NSString*) value;

+ 4 - 4
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -2833,10 +2833,10 @@ void UncaughtExceptionHandler(NSException *exception) {
         //        }
     }
 }
--(void) didRotated
-{
-    
-}
+//-(void) didRotated
+//{
+//    
+//}
 
 
 /**

+ 6 - 6
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.pbxproj

@@ -7,6 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		71E9F6C81F8C5CCB0052C78E /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6C61F8C5CCA0052C78E /* NetworkUtils.m */; };
 		71F3A9A21F5F8E22001036C8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A11F5F8E22001036C8 /* main.m */; };
 		71F3A9A51F5F8E22001036C8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A41F5F8E22001036C8 /* AppDelegate.m */; };
 		71F3A9A81F5F8E22001036C8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A71F5F8E22001036C8 /* ViewController.m */; };
@@ -20,7 +21,6 @@
 		71F3A9CC1F5FA11F001036C8 /* LoginTextFiledCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9C61F5FA11F001036C8 /* LoginTextFiledCell.m */; };
 		71F3A9CD1F5FA11F001036C8 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9C81F5FA11F001036C8 /* LoginViewController.m */; };
 		71F3A9D01F5FA277001036C8 /* BasicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9CF1F5FA277001036C8 /* BasicViewController.m */; };
-		71F3A9D61F5FA2F4001036C8 /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9D51F5FA2F4001036C8 /* NetworkUtils.m */; };
 		71F3A9D91F5FA3B9001036C8 /* RAMobileNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9D81F5FA3B9001036C8 /* RAMobileNetwork.m */; };
 		71F3A9DC1F5FA458001036C8 /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9DB1F5FA458001036C8 /* RANetworkTaskDelegate.m */; };
 		71F3A9E01F5FA484001036C8 /* RAUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9DF1F5FA484001036C8 /* RAUtils.m */; };
@@ -85,6 +85,8 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		71E9F6C61F8C5CCA0052C78E /* NetworkUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = ../../common/NetworkUtils.m; sourceTree = "<group>"; };
+		71E9F6C71F8C5CCA0052C78E /* NetworkUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
 		71F3A99D1F5F8E22001036C8 /* RedAnt Mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RedAnt Mobile.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		71F3A9A11F5F8E22001036C8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		71F3A9A31F5F8E22001036C8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -110,8 +112,6 @@
 		71F3A9CF1F5FA277001036C8 /* BasicViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicViewController.m; sourceTree = "<group>"; };
 		71F3A9D11F5FA2A4001036C8 /* const.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = const.h; sourceTree = "<group>"; };
 		71F3A9D21F5FA2B3001036C8 /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
-		71F3A9D41F5FA2F4001036C8 /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = "../../RedAnt ERP Mobile/common/NetworkUtils.h"; sourceTree = "<group>"; };
-		71F3A9D51F5FA2F4001036C8 /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = "../../RedAnt ERP Mobile/common/NetworkUtils.m"; sourceTree = "<group>"; };
 		71F3A9D71F5FA3B9001036C8 /* RAMobileNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMobileNetwork.h; sourceTree = "<group>"; };
 		71F3A9D81F5FA3B9001036C8 /* RAMobileNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAMobileNetwork.m; sourceTree = "<group>"; };
 		71F3A9DA1F5FA458001036C8 /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
@@ -332,8 +332,8 @@
 			children = (
 				71F3A9F71F5FA688001036C8 /* Reachability.h */,
 				71F3A9F81F5FA688001036C8 /* Reachability.m */,
-				71F3A9D41F5FA2F4001036C8 /* NetworkUtils.h */,
-				71F3A9D51F5FA2F4001036C8 /* NetworkUtils.m */,
+				71E9F6C71F8C5CCA0052C78E /* NetworkUtils.h */,
+				71E9F6C61F8C5CCA0052C78E /* NetworkUtils.m */,
 				71F3A9D71F5FA3B9001036C8 /* RAMobileNetwork.h */,
 				71F3A9D81F5FA3B9001036C8 /* RAMobileNetwork.m */,
 				71F3A9DA1F5FA458001036C8 /* RANetworkTaskDelegate.h */,
@@ -604,7 +604,6 @@
 				71F3AA5B1F624A88001036C8 /* SignatureView.m in Sources */,
 				71F3A9CC1F5FA11F001036C8 /* LoginTextFiledCell.m in Sources */,
 				71F3AA371F612369001036C8 /* CommonEditorCellAction.m in Sources */,
-				71F3A9D61F5FA2F4001036C8 /* NetworkUtils.m in Sources */,
 				71F3AA381F612369001036C8 /* CommonEditorCellEdit.m in Sources */,
 				71F3AA641F624B2F001036C8 /* BundleModelCell.m in Sources */,
 				71F3A9FC1F5FCC79001036C8 /* LoginSettingViewController.m in Sources */,
@@ -625,6 +624,7 @@
 				71F3A9A21F5F8E22001036C8 /* main.m in Sources */,
 				71F3AA951F6277DE001036C8 /* DefaultAppearance.m in Sources */,
 				71F3A9CD1F5FA11F001036C8 /* LoginViewController.m in Sources */,
+				71E9F6C81F8C5CCB0052C78E /* NetworkUtils.m in Sources */,
 				71F3A9D01F5FA277001036C8 /* BasicViewController.m in Sources */,
 				71F3AA531F6125ED001036C8 /* ImageViewController.m in Sources */,
 				71F3AA411F612369001036C8 /* CommonEditorViewController.m in Sources */,

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


+ 41 - 0
RedAnt Mobile/RedAnt Mobile/const.h

@@ -46,4 +46,45 @@
 #define  ACTION_SAVE_DATA 0
 #define ACTION_FILL_SECTION 1
 
+
+
+
+#define RESULT_FALSE 0
+#define RESULT_TRUE         2
+#define RESULT_NO_EMAIL_ADDRESS      3
+#define RESULT_NET_SERVER_ERR         -1
+#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 /* const_h */