Bläddra i källkod

修复ERP Mobile 工程的部分警告错误

Ray Zhang 6 år sedan
förälder
incheckning
2963b23170
54 ändrade filer med 856 tillägg och 594 borttagningar
  1. 4 0
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellImg.m
  2. 3 3
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellMAction.m
  3. 4 4
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellSignature.m
  4. 4 4
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellSwitch.m
  5. 3 3
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m
  6. 19 11
      RedAnt ERP Mobile/common/CommonEditor/EnumSelectViewController.m
  7. 4 4
      RedAnt ERP Mobile/common/CommonEditor/EnumSelectorCell.m
  8. 10 10
      RedAnt ERP Mobile/common/Functions/MainViewController.m
  9. 106 52
      RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m
  10. 34 13
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  11. 1 1
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.h
  12. 31 21
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m
  13. 35 23
      RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m
  14. 3 3
      RedAnt ERP Mobile/common/Functions/home/HomeTableViewCellButtonBanner.m
  15. 30 22
      RedAnt ERP Mobile/common/Functions/home/HomeViewController.m
  16. 6 6
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  17. 4 4
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailImageCell.m
  18. 4 4
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailKVCell.m
  19. 1 1
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.h
  20. 39 32
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  21. 1 1
      RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m
  22. 3 3
      RedAnt ERP Mobile/common/Functions/order/OrderDetailInfoCell.m
  23. 1 0
      RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m
  24. 3 3
      RedAnt ERP Mobile/common/Functions/order/OrderDetailPriceCell.m
  25. 3 3
      RedAnt ERP Mobile/common/Functions/order/OrderDetailSignatureCell.m
  26. 22 22
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m
  27. 1 0
      RedAnt ERP Mobile/common/Functions/order/OrderListTableViewCell.m
  28. 1 0
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioListTableViewCell.m
  29. 21 8
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m
  30. 10 2
      RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m
  31. 1 0
      RedAnt ERP Mobile/common/Functions/search+itemsearch/FilterCellCadedate.m
  32. 1 0
      RedAnt ERP Mobile/common/Functions/search+itemsearch/FilterCellValue.m
  33. 1 1
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchFilterViewController.h
  34. 83 70
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m
  35. 87 75
      RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m
  36. 2 1
      RedAnt ERP Mobile/common/Functions/sidemenu/FunctionTestViewController.m
  37. 1 1
      RedAnt ERP Mobile/common/Functions/sidemenu/ScannerSettingViewController.h
  38. 7 7
      RedAnt ERP Mobile/common/Functions/signature/SignatureView.m
  39. 22 15
      RedAnt ERP Mobile/common/Functions/signature/SignatureViewController.m
  40. 26 9
      RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m
  41. 16 4
      RedAnt ERP Mobile/common/JKLock/JKLockController.m
  42. 16 7
      RedAnt ERP Mobile/common/PhotoList/Controller/ContentPreviewController.m
  43. 4 4
      RedAnt ERP Mobile/common/categoryMenu_RATree/RATreeView+Enums.m
  44. 3 2
      RedAnt ERP Mobile/common/categoryMenu_RATree/RATreeView.h
  45. 8 8
      RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.m
  46. 4 3
      RedAnt ERP Mobile/common/customUI/ImageScrollerView.m
  47. 56 29
      RedAnt ERP Mobile/common/customUI/ImageScrollerViewController.m
  48. 75 75
      RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m
  49. 4 4
      RedAnt ERP Mobile/common/customUI/RTLabel.h
  50. 5 5
      RedAnt ERP Mobile/common/customUI/RTLabel.m
  51. 8 6
      RedAnt ERP Mobile/common/iSalesNavigationController.m
  52. 11 2
      RedAnt ERP Mobile/common/photoStack/PhotoStackViewController.m
  53. 3 3
      common/NetworkUtils.m
  54. 1 0
      common/WK PDF+Web/RAPDFViewController.m

+ 4 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellImg.m

@@ -30,6 +30,10 @@
     [super setSelected:selected animated:animated];
     
     // Configure the view for the selected state
+}
+-(void)TouchImageViewOnLongPress:(TouchImageView *)touchImageView
+{
+    
 }
 - (void)TouchImageViewOnTouche:(TouchImageView *)touchImageView
 {

+ 3 - 3
RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellMAction.m

@@ -10,9 +10,9 @@
 
 @implementation CommonEditorCellMAction
 
-- (void)awakeFromNib {
-    // Initialization code
-}
+//- (void)awakeFromNib {
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];

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

@@ -19,10 +19,10 @@
     return self;
 }
 
-- (void)awakeFromNib
-{
-    // Initialization code
-}
+//- (void)awakeFromNib
+//{
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {

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

@@ -19,10 +19,10 @@
     return self;
 }
 
-- (void)awakeFromNib
-{
-    // Initialization code
-}
+//- (void)awakeFromNib
+//{
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {

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

@@ -3207,9 +3207,9 @@
         NSString* value =[item_json valueForKey:@"value"];
         NSString* align =[item_json valueForKey:@"align"];
         if([align isEqualToString:@"right"])
-            cell.textview.textAlignment= kCTRightTextAlignment;
+            cell.textview.textAlignment= kCTTextAlignmentRight;
         else
-            cell.textview.textAlignment =kCTLeftTextAlignment;
+            cell.textview.textAlignment =kCTTextAlignmentLeft;
         
         int capital =[[item_json valueForKey:@"capital"] intValue];
         switch (capital) {
@@ -4699,7 +4699,7 @@
             return nil;
         }
         NSString* value = [item_json valueForKey:@"value"];
-        [self commonAction:value index:indexPath data:item_json];
+        [self commonAction:value index:indexPath data:[item_json mutableCopy]];
     }
     else if([control isEqualToString:@"datepicker"])
     {

+ 19 - 11
RedAnt ERP Mobile/common/CommonEditor/EnumSelectViewController.m

@@ -143,17 +143,25 @@
     // Dispose of any resources that can be recreated.
 }
 
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    
-    [self.tableEnum reloadData];
-//    
-//    UIApplication * app = [UIApplication sharedApplication];
-//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-//    [appDelegate didRotated];
-    
-    
-    
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//
+//    [self.tableEnum reloadData];
+////
+////    UIApplication * app = [UIApplication sharedApplication];
+////    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+////    [appDelegate didRotated];
+//
+//
+//
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        [self.tableEnum reloadData];
+    }];
 }
 #pragma mark - Table view data source
 

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

@@ -19,10 +19,10 @@
     return self;
 }
 
-- (void)awakeFromNib
-{
-    // Initialization code
-}
+//- (void)awakeFromNib
+//{
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {

+ 10 - 10
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -273,8 +273,8 @@
     
     if(/*appDelegate.user_type==USER_ROLE_EMPLOYEE*/true)
         self.btnContact.hidden = NO;
-    else
-        self.btnContact.hidden = YES;
+//    else
+//        self.btnContact.hidden = YES;
     
     NSDictionary * customerinfo=appDelegate.customerInfo;
     NSString * contact=nil;
@@ -1072,8 +1072,8 @@
     
     if(/*appDelegate.user_type==USER_ROLE_EMPLOYEE*/true)
         self.btnContact.hidden = NO;
-    else
-        self.btnContact.hidden = YES;
+//    else
+//        self.btnContact.hidden = YES;
     
     NSDictionary * customerinfo=appDelegate.customerInfo;
     NSString * contact=nil;
@@ -1504,12 +1504,12 @@
 //                        [alert show];
                     }
                 }
-                else
-                {
-                    [self checklogin:true];
-                    self.previous_VC = self.current_VC;
-                    [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
-                }
+//                else
+//                {
+//                    [self checklogin:true];
+//                    self.previous_VC = self.current_VC;
+//                    [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
+//                }
             }
             
             //            self.offset = 0;

+ 106 - 52
RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m

@@ -60,62 +60,116 @@
     return false;
     
 }
-
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    
-
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    CGRect rect=self.view.bounds;
-    
-    DebugLog(@"%@",NSStringFromCGRect(self.focusZone.frame));
-    //    rect.origin.y=rect.origin.y+40;
-    //    rect.size.height = rect.size.height-40;
-    
-    
-    
-    
-    
-    
-    
-    [CATransaction begin];
-    [CATransaction setAnimationDuration:0.5];
-    [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
-//    [self updatePreviewLayerForOrientation:toInterfaceOrientation];
-    _previewLayer.position = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
-    
- //   self.backgroundView.highLightRect = CGRectInset(self.focusZone.frame,6,6);
-    _previewLayer.bounds = rect;
-    
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    switch (orientation) {
+#pragma mark routate
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        CGRect rect=self.view.bounds;
             
+            DebugLog(@"%@",NSStringFromCGRect(self.focusZone.frame));
+            //    rect.origin.y=rect.origin.y+40;
+            //    rect.size.height = rect.size.height-40;
             
             
-        case UIInterfaceOrientationPortrait:
-           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(0)];
-           
-            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortrait;
-            break;
-        case UIInterfaceOrientationPortraitUpsideDown:
-            //[_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI)];
-            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortraitUpsideDown;
-            break;
-        case UIInterfaceOrientationLandscapeLeft:
-           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI/2)];
-            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeLeft;
-            break;
-        case UIInterfaceOrientationLandscapeRight:
-           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(-M_PI/2)];
-            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeRight;
-            break;
-        default:
-            break;
-    }
-    [CATransaction commit];
-
-    
+            
+            
+            
+            
+            
+            [CATransaction begin];
+            [CATransaction setAnimationDuration:0.5];
+            [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+        //    [self updatePreviewLayerForOrientation:toInterfaceOrientation];
+        self->_previewLayer.position = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
+            
+         //   self.backgroundView.highLightRect = CGRectInset(self.focusZone.frame,6,6);
+        self->_previewLayer.bounds = rect;
+            
+            UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+            switch (orientation) {
+                    
+                    
+                    
+                case UIInterfaceOrientationPortrait:
+                   // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(0)];
+                   
+                    self->_previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortrait;
+                    break;
+                case UIInterfaceOrientationPortraitUpsideDown:
+                    //[_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI)];
+                    self->_previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortraitUpsideDown;
+                    break;
+                case UIInterfaceOrientationLandscapeLeft:
+                   // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI/2)];
+                    self->_previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeLeft;
+                    break;
+                case UIInterfaceOrientationLandscapeRight:
+                   // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(-M_PI/2)];
+                    self->_previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeRight;
+                    break;
+                default:
+                    break;
+            }
+            [CATransaction commit];
+    }];
 }
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//
+//
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    CGRect rect=self.view.bounds;
+//
+//    DebugLog(@"%@",NSStringFromCGRect(self.focusZone.frame));
+//    //    rect.origin.y=rect.origin.y+40;
+//    //    rect.size.height = rect.size.height-40;
+//
+//
+//
+//
+//
+//
+//
+//    [CATransaction begin];
+//    [CATransaction setAnimationDuration:0.5];
+//    [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+////    [self updatePreviewLayerForOrientation:toInterfaceOrientation];
+//    _previewLayer.position = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
+//
+// //   self.backgroundView.highLightRect = CGRectInset(self.focusZone.frame,6,6);
+//    _previewLayer.bounds = rect;
+//
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    switch (orientation) {
+//
+//
+//
+//        case UIInterfaceOrientationPortrait:
+//           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(0)];
+//
+//            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortrait;
+//            break;
+//        case UIInterfaceOrientationPortraitUpsideDown:
+//            //[_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI)];
+//            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortraitUpsideDown;
+//            break;
+//        case UIInterfaceOrientationLandscapeLeft:
+//           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI/2)];
+//            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeLeft;
+//            break;
+//        case UIInterfaceOrientationLandscapeRight:
+//           // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(-M_PI/2)];
+//            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeRight;
+//            break;
+//        default:
+//            break;
+//    }
+//    [CATransaction commit];
+//
+//
+//}
 //- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
 //{
 //    return UIInterfaceOrientationPortrait;

+ 34 - 13
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -3623,24 +3623,45 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 #pragma mark - rotation
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    self.sortItemController.view.frame = self.view.bounds;
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//
+//    self.sortItemController.view.frame = self.view.bounds;
+//}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+//        self.sortItemController.view.frame = self.view.bounds;
+          self.sortItemController.view.frame = self.view.bounds;
+             self.toolpanel.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.toolpanel.bounds].CGPath;
+            
+        //    [self.itemListTable reloadData];
+            
+            self.cartIndicatorBar.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.cartIndicatorBar.bounds].CGPath;
+            [self layoutCartIndicatorBar];
+    }];
 }
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+
+-(BOOL) shouldAutorotate
+{
     return YES;
 }
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//    return YES;
+//}
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    self.sortItemController.view.frame = self.view.bounds;
-     self.toolpanel.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.toolpanel.bounds].CGPath;
-    
-//    [self.itemListTable reloadData];
-    
-    self.cartIndicatorBar.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.cartIndicatorBar.bounds].CGPath;
-    [self layoutCartIndicatorBar];
-}
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    self.sortItemController.view.frame = self.view.bounds;
+//     self.toolpanel.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.toolpanel.bounds].CGPath;
+//
+////    [self.itemListTable reloadData];
+//
+//    self.cartIndicatorBar.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.cartIndicatorBar.bounds].CGPath;
+//    [self layoutCartIndicatorBar];
+//}
 
 #pragma mark - notification action
 

+ 1 - 1
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.h

@@ -39,7 +39,7 @@ typedef void (^add_to_cart_Handler)(void);
 @property bool loadall;
 @property long offset;
 
--(void) showDetailat:(NSString*) item_id category_id:(NSString*) category_id index:(long)index;
+//-(void) showDetailat:(NSString*) item_id category_id:(NSString*) category_id index:(long)index;
 -(void) showCategory;
 -(void) reload;
 -(void) loadMore;

+ 31 - 21
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -1376,30 +1376,40 @@
     //[self switchToCagegory:category];
     
 }
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
-    {
-        self.orientation = orientation;
-        [self.collectionview.collectionViewLayout invalidateLayout];
-        DebugLog(@"routed");
-    }
-    
-}
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+//    {
+//        self.orientation = orientation;
+//        [self.collectionview.collectionViewLayout invalidateLayout];
+//        DebugLog(@"routed");
+//    }
+//    
+//}
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
-    
-    self.toOrientation = toInterfaceOrientation;
-    [self.collectionview.collectionViewLayout invalidateLayout];
-    
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+//    
+//    self.toOrientation = toInterfaceOrientation;
+//    [self.collectionview.collectionViewLayout invalidateLayout];
+//    
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        
+        
+            self.toOrientation = [UIApplication sharedApplication].statusBarOrientation;
+        [self.collectionview.collectionViewLayout invalidateLayout];
+    }];
 }
 
-
 - (IBAction)onCategoryClick:(id)sender {
     RAViewController * categorymenuVC =[[UIStoryboard storyboardWithName:@"ERP_Mobile_Search" bundle:nil] instantiateViewControllerWithIdentifier:@"RAViewController"];
     

+ 35 - 23
RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m

@@ -533,30 +533,42 @@
     [self.navigationController popViewControllerAnimated:(false)];
     
 }
-- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    [self.table reloadData];
-    NSLog(@"%s reloadData",__FUNCTION__);
-    //    CGSize contentsize = self.scroll.contentSize;
-    //    contentsize.height =330+2 * 230+29+20+20 +1 * 230+29+20+20 ;
-    //    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
-    //    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
-    //    {
-    //        contentsize.height+=250;
-    //    }
-    //
-    //    self.scroll.contentSize = contentsize;
-    //    //     CGRect frame = self.view.frame;
-    //    //    [self.carouselController.view removeFromSuperview];
-    //    //    wait(2000);
-    //    //    self.carouselController = [[FPCarouselNonXIBViewController alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 400)];
-    //    //    [self.view addSubview:self.carouselController.view];
-    //    //    int i = self.view.subviews.count;
-    //    //    int b = 0;
-    //    // [self.carouselController updateFrame:CGRectMake(0, 0, self.view.frame.size.width, 400)];
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+            DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
+
+        [self.table reloadData];
+        NSLog(@"%s reloadData",__FUNCTION__);
+    }];
 }
+//- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    [self.table reloadData];
+//    NSLog(@"%s reloadData",__FUNCTION__);
+//    //    CGSize contentsize = self.scroll.contentSize;
+//    //    contentsize.height =330+2 * 230+29+20+20 +1 * 230+29+20+20 ;
+//    //    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
+//    //    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
+//    //    {
+//    //        contentsize.height+=250;
+//    //    }
+//    //
+//    //    self.scroll.contentSize = contentsize;
+//    //    //     CGRect frame = self.view.frame;
+//    //    //    [self.carouselController.view removeFromSuperview];
+//    //    //    wait(2000);
+//    //    //    self.carouselController = [[FPCarouselNonXIBViewController alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 400)];
+//    //    //    [self.view addSubview:self.carouselController.view];
+//    //    //    int i = self.view.subviews.count;
+//    //    //    int b = 0;
+//    //    // [self.carouselController updateFrame:CGRectMake(0, 0, self.view.frame.size.width, 400)];
+//}
 //
 //-(void)changeCell
 //{

+ 3 - 3
RedAnt ERP Mobile/common/Functions/home/HomeTableViewCellButtonBanner.m

@@ -10,9 +10,9 @@
 
 @implementation HomeTableViewCellButtonBanner
 
-- (void)awakeFromNib {
-    // Initialization code
-}
+//- (void)awakeFromNib {
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];

+ 30 - 22
RedAnt ERP Mobile/common/Functions/home/HomeViewController.m

@@ -280,28 +280,36 @@
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
 }
-- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    [self.homeTable reloadData];
-    //    CGSize contentsize = self.scroll.contentSize;
-    //    contentsize.height =330+2 * 230+29+20+20 +1 * 230+29+20+20 ;
-    //    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
-    //    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
-    //    {
-    //        contentsize.height+=250;
-    //    }
-    //
-    //    self.scroll.contentSize = contentsize;
-    //    //     CGRect frame = self.view.frame;
-    //    //    [self.carouselController.view removeFromSuperview];
-    //    //    wait(2000);
-    //    //    self.carouselController = [[FPCarouselNonXIBViewController alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 400)];
-    //    //    [self.view addSubview:self.carouselController.view];
-    //    //    int i = self.view.subviews.count;
-    //    //    int b = 0;
-    //    // [self.carouselController updateFrame:CGRectMake(0, 0, self.view.frame.size.width, 400)];
+//- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    [self.homeTable reloadData];
+//    //    CGSize contentsize = self.scroll.contentSize;
+//    //    contentsize.height =330+2 * 230+29+20+20 +1 * 230+29+20+20 ;
+//    //    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
+//    //    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
+//    //    {
+//    //        contentsize.height+=250;
+//    //    }
+//    //
+//    //    self.scroll.contentSize = contentsize;
+//    //    //     CGRect frame = self.view.frame;
+//    //    //    [self.carouselController.view removeFromSuperview];
+//    //    //    wait(2000);
+//    //    //    self.carouselController = [[FPCarouselNonXIBViewController alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 400)];
+//    //    //    [self.view addSubview:self.carouselController.view];
+//    //    //    int i = self.view.subviews.count;
+//    //    //    int b = 0;
+//    //    // [self.carouselController updateFrame:CGRectMake(0, 0, self.view.frame.size.width, 400)];
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        [self.homeTable reloadData];
+    }];
 }
 #pragma mark - Table view data source
 - (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath*)indexPath

+ 6 - 6
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -457,7 +457,7 @@
 
 - (IBAction)add_toCart:(id)sender {
     
-    [CartUtils add_to_cart:self selectorholder:self selector:@selector(addtocart)];
+    [CartUtils add_to_cart:[RAUtils getViewController:self] selectorholder:self selector:@selector(addtocart)];
     return;
 
 //
@@ -1347,10 +1347,10 @@
 //    }
     
     // 调用展示窗口
-    ImageScrollerViewController *imgShow = [[ImageScrollerViewController alloc] initWithSourceData:[self.photos mutableCopy] withIndex:index];
-    
-    UIViewController *vc= [RAUtils getViewController:self];
-    [vc.navigationController pushViewController:imgShow animated:true];
+//    ImageScrollerViewController *imgShow = [[ImageScrollerViewController alloc] initWithSourceData:[self.photos mutableCopy] withIndex:index];
+//    
+//    UIViewController *vc= [RAUtils getViewController:self];
+//    [vc.navigationController pushViewController:imgShow animated:true];
    // UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:imgShow];
     
    // [self presentViewController:nav  animated:YES completion:nil];
@@ -1363,7 +1363,7 @@
 -(void) neworder
 {
     
-    UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Create Order"];
+    UIAlertController * waitalert = [RAUtils waiting_alert:[RAUtils getViewController:self] title:@"Create Order"];
     [RANetwork request_create_order:^(NSMutableDictionary *result) {
         NSMutableDictionary* return_json = result;
         

+ 4 - 4
RedAnt ERP Mobile/common/Functions/modelDetail/DetailImageCell.m

@@ -19,10 +19,10 @@
     return self;
 }
 
-- (void)awakeFromNib
-{
-    // Initialization code
-}
+//- (void)awakeFromNib
+//{
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {

+ 4 - 4
RedAnt ERP Mobile/common/Functions/modelDetail/DetailKVCell.m

@@ -19,10 +19,10 @@
     return self;
 }
 
-- (void)awakeFromNib
-{
-    // Initialization code
-}
+//- (void)awakeFromNib
+//{
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {

+ 1 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.h

@@ -26,7 +26,7 @@
 @property int step;
 //@property (weak, nonatomic) IBOutlet UIButton *btn_hangtag;
 
-@property (strong,nonatomic) UIPopoverController *popover;
+//@property (strong,nonatomic) UIPopoverController *popover;
 
 
 @property (nonatomic , copy) void (^OnBack)(bool add_cart,bool add_wish,bool update_data);

+ 39 - 32
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -141,8 +141,8 @@ dispatch_async(dispatch_get_main_queue(), ^{
             //          AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
             if(/*appDelegate.user_type==USER_ROLE_CUSTOMER*/true)
                 self.quantity =[[imgsection valueForKey:@"stockUom"] intValue];
-            else
-                self.quantity =1;
+//            else
+//                self.quantity =1;
             
             if(self.quantity==0)
                 self.quantity=1;
@@ -544,40 +544,47 @@ dispatch_async(dispatch_get_main_queue(), ^{
 ////        [self onDecodedData:@"3712524-235"];
 //        return;
 //}
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+////    [self.detailTable reloadData];
+////    return;
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//
+////    NSMutableIndexSet *sectionToReload =  [[NSMutableIndexSet alloc] init];
+////        int section_count =[[self.detail_data valueForKey:@"detail_section_count"] intValue];
+////
+////    for(int i=0;i<section_count;i++)
+////    {
+////        NSDictionary* section_json = [self.detail_data objectForKey:[NSString stringWithFormat:@"detail_%ld",(long)i]];
+////
+////
+////
+////        NSString* type=[section_json valueForKey:@"type"] ;
+////
+////        if([type isEqualToString:@"kv"])
+////        {
+////
+////            [sectionToReload addIndex:i+1];
+////        }
+////    }
+////
+////
+////    [self.detailTable reloadSections:sectionToReload withRowAnimation:UITableViewRowAnimationNone];
+////
+//
 //    [self.detailTable reloadData];
-//    return;
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    
-//    NSMutableIndexSet *sectionToReload =  [[NSMutableIndexSet alloc] init];
-//        int section_count =[[self.detail_data valueForKey:@"detail_section_count"] intValue];
-//    
-//    for(int i=0;i<section_count;i++)
-//    {
-//        NSDictionary* section_json = [self.detail_data objectForKey:[NSString stringWithFormat:@"detail_%ld",(long)i]];
-//        
-//       
-//        
-//        NSString* type=[section_json valueForKey:@"type"] ;
-//        
-//        if([type isEqualToString:@"kv"])
-//        {
 //
-//            [sectionToReload addIndex:i+1];
-//        }
-//    }
-//    
 //
-//    [self.detailTable reloadSections:sectionToReload withRowAnimation:UITableViewRowAnimationNone];
-//    
-
-    [self.detailTable reloadData];
-    
-    
-    
+//
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        [self.detailTable reloadData];
+    }];
 }
-
 #pragma mark - Notification
 
 - (void)registNotification {

+ 1 - 1
RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m

@@ -83,7 +83,7 @@
                                   @"so_id" : so_id,
                                   @"sync_data" : sync_data_str
                                   } mutableCopy];
-            [_sync_data addObject:dic];
+            [self->_sync_data addObject:dic];
             
             
         }];

+ 3 - 3
RedAnt ERP Mobile/common/Functions/order/OrderDetailInfoCell.m

@@ -10,9 +10,9 @@
 
 @implementation OrderDetailInfoCell
 
-- (void)awakeFromNib {
-    // Initialization code
-}
+//- (void)awakeFromNib {
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];

+ 1 - 0
RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m

@@ -21,6 +21,7 @@
 @implementation OrderDetailModelCell
 
 - (void)awakeFromNib {
+    [super awakeFromNib];
     // Initialization code
 }
 

+ 3 - 3
RedAnt ERP Mobile/common/Functions/order/OrderDetailPriceCell.m

@@ -10,9 +10,9 @@
 
 @implementation OrderDetailPriceCell
 
-- (void)awakeFromNib {
-    // Initialization code
-}
+//- (void)awakeFromNib {
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];

+ 3 - 3
RedAnt ERP Mobile/common/Functions/order/OrderDetailSignatureCell.m

@@ -10,9 +10,9 @@
 
 @implementation OrderDetailSignatureCell
 
-- (void)awakeFromNib {
-    // Initialization code
-}
+//- (void)awakeFromNib {
+//    // Initialization code
+//}
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];

+ 22 - 22
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -1567,28 +1567,28 @@
     
     // 这里有问题,npd 里order 提交后,product id 为空,暂时屏蔽掉
     return;
-    
-    
-    UITableViewCell* cell =(UITableViewCell*) sender.superview.superview;
-    
-    NSIndexPath *   indexPath = [self.detailTable indexPathForCell:cell];
-    
-//    if(indexPath.section!=1)
-//        return ;
-    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
-   NSDictionary * item_json = self.content_data[[NSString stringWithFormat:@"section_%ld",(long)indexPath.section]][@"data"][[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
-//    NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
-    
-    NSString* product_id = [item_json valueForKey:@"product_id"];
-    
-    DetailViewController* dvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Model" bundle:nil] instantiateViewControllerWithIdentifier:@"DetailViewController" ];
-    //            dvc
-    
-    dvc.product_id=product_id;
-    dvc.category_id=nil;
-    dvc.ispush=true;
-    [dvc reload];
-    [self.navigationController pushViewController:dvc animated:true];
+    // 以下为屏蔽前的代码
+//
+//    UITableViewCell* cell =(UITableViewCell*) sender.superview.superview;
+//
+//    NSIndexPath *   indexPath = [self.detailTable indexPathForCell:cell];
+//
+////    if(indexPath.section!=1)
+////        return ;
+//    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+//   NSDictionary * item_json = self.content_data[[NSString stringWithFormat:@"section_%ld",(long)indexPath.section]][@"data"][[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
+////    NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
+//
+//    NSString* product_id = [item_json valueForKey:@"product_id"];
+//
+//    DetailViewController* dvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Model" bundle:nil] instantiateViewControllerWithIdentifier:@"DetailViewController" ];
+//    //            dvc
+//
+//    dvc.product_id=product_id;
+//    dvc.category_id=nil;
+//    dvc.ispush=true;
+//    [dvc reload];
+//    [self.navigationController pushViewController:dvc animated:true];
 }
 /*
  #pragma mark - Navigation

+ 1 - 0
RedAnt ERP Mobile/common/Functions/order/OrderListTableViewCell.m

@@ -11,6 +11,7 @@
 @implementation OrderListTableViewCell
 
 - (void)awakeFromNib {
+    [super awakeFromNib];
     // Initialization code
 }
 

+ 1 - 0
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioListTableViewCell.m

@@ -11,6 +11,7 @@
 @implementation PortfolioListTableViewCell
 
 - (void)awakeFromNib {
+    [super awakeFromNib];
     // Initialization code
 }
 

+ 21 - 8
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m

@@ -2104,18 +2104,31 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 #pragma mark - rotation
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    self.sortItemController.view.frame = self.view.bounds;
-}
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//
+//    self.sortItemController.view.frame = self.view.bounds;
+//}
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return YES;
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        self.sortItemController.view.frame = self.view.bounds;
+    }];
 }
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    self.sortItemController.view.frame = self.view.bounds;
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//    return YES;
+//}
+
+- (BOOL)shouldAutorotate{
+    return YES;
 }
+//
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    self.sortItemController.view.frame = self.view.bounds;
+//}
 
 - (void)reRefreshView {
     [self.itemListTable reloadData];

+ 10 - 2
RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m

@@ -261,7 +261,11 @@
         
         
         
-        [pdf_url appendString:[valuefrom stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+//        [pdf_url appendString:[valuefrom stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+        
+        
+        [pdf_url appendString:[valuefrom stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "]]];
+        
         
         //    NSString* value=[self getValue:valuefrom];
         
@@ -633,7 +637,11 @@
         
         
         
-        [pdf_url appendString:[valuefrom stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+//        [pdf_url appendString:[valuefrom stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+//        
+        [pdf_url appendString:[valuefrom stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "]]];
+        
+        
         
         //    NSString* value=[self getValue:valuefrom];
         

+ 1 - 0
RedAnt ERP Mobile/common/Functions/search+itemsearch/FilterCellCadedate.m

@@ -21,6 +21,7 @@
 
 - (void)awakeFromNib
 {
+    [super awakeFromNib];
     // Initialization code
 }
 

+ 1 - 0
RedAnt ERP Mobile/common/Functions/search+itemsearch/FilterCellValue.m

@@ -21,6 +21,7 @@
 
 - (void)awakeFromNib
 {
+    [super awakeFromNib];
     // Initialization code
 }
 

+ 1 - 1
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchFilterViewController.h

@@ -26,7 +26,7 @@
 @property (strong, nonatomic) IBOutlet UIButton *buttonPrice;
 @property (strong, nonatomic) IBOutlet UIButton *buttonBestSeller;
 @property (nonatomic , copy) void (^SearchClick)(NSString* ids,NSString* modelname,NSString* modeldescrip,NSString* alert,NSString* available,NSString* QTY,NSString* price , NSString* bestseller);
-@property (nonatomic , copy) void (^ResetClick)();
+@property (nonatomic , copy) void (^ResetClick)(void);
 
 @property (strong, nonatomic) NSDictionary* alert_cadedate;
 @property (strong, nonatomic) NSDictionary* qty_cadedate;

+ 83 - 70
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m

@@ -1553,27 +1553,40 @@
  
  
  }*/
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
-    {
-        // self.orientation = orientation;
-        [self.collectionview.collectionViewLayout invalidateLayout];
-        DebugLog(@"routed");
-    }
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+//    {
+//        // self.orientation = orientation;
+//        [self.collectionview.collectionViewLayout invalidateLayout];
+//        DebugLog(@"routed");
+//    }
+//
+//}
 
-}
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+//    
+//    self.toOrientation = toInterfaceOrientation;
+//    [self.collectionview.collectionViewLayout invalidateLayout];
+//    
+//}
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
-    
-    self.toOrientation = toInterfaceOrientation;
-    [self.collectionview.collectionViewLayout invalidateLayout];
-    
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        
+        
+            self.toOrientation = [UIApplication sharedApplication].statusBarOrientation;
+        [self.collectionview.collectionViewLayout invalidateLayout];
+    }];
 }
 
 #pragma mark -- UICollectionViewDataSource
@@ -2011,57 +2024,57 @@
     [self.navigationController pushViewController:dvc animated:true];
     return;
     
-    //一下为detail嵌入当前窗口的方式
-    self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
-    //[self.collectionview.collectionViewLayout invalidateLayout];
-    [self.collectionview reloadData];
-    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
-    int width=175;
-    // int height;
-    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
-    {
-        width = 370;
-        //      height = 400;
-    }
-    else
-    {
-        UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
-        
-        flowLayout.scrollDirection= UICollectionViewScrollDirectionHorizontal;
-        //        [self.collectionview ] set
-        //      height = 251;
-        width = 180;
-    }
-    
-    
-    CGRect frame = CGRectMake(0, 48, self.view.bounds.size.width, 271);
-    
-    
-  //  CGRect framedetail = CGRectMake(0,271 ,self.view.bounds.size.width,self.view.bounds.size.height-271);
-    
-    [UIView animateWithDuration:0.5 animations:^{
-        self.collectionview.frame=frame;
-//        self.detailView.frame = framedetail;
-        //        self.cagegoryLabel.hidden = true;
-    }];
-    self.collectionview.autoresizingMask = self.collectionview.autoresizingMask ^ UIViewAutoresizingFlexibleWidth;
-    
-    self.showDetail = true;
-    
-    
-    NSArray* a= self.childViewControllers;
-    
-    for (int i=0;i<a.count;i++)
-    {
-        if([a[i] isKindOfClass:[DetailViewController class]])
-        {
-            DetailViewController *detailvc=a[i];
-            detailvc.category_id = nil;
-            detailvc.product_id = item_id;
-            detailvc.ispush=false;
-            [detailvc reload];
-        }
-    }
+//    //一下为detail嵌入当前窗口的方式
+//    self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
+//    //[self.collectionview.collectionViewLayout invalidateLayout];
+//    [self.collectionview reloadData];
+//    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
+//    int width=175;
+//    // int height;
+//    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
+//    {
+//        width = 370;
+//        //      height = 400;
+//    }
+//    else
+//    {
+//        UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
+//        
+//        flowLayout.scrollDirection= UICollectionViewScrollDirectionHorizontal;
+//        //        [self.collectionview ] set
+//        //      height = 251;
+//        width = 180;
+//    }
+//    
+//    
+//    CGRect frame = CGRectMake(0, 48, self.view.bounds.size.width, 271);
+//    
+//    
+//  //  CGRect framedetail = CGRectMake(0,271 ,self.view.bounds.size.width,self.view.bounds.size.height-271);
+//    
+//    [UIView animateWithDuration:0.5 animations:^{
+//        self.collectionview.frame=frame;
+////        self.detailView.frame = framedetail;
+//        //        self.cagegoryLabel.hidden = true;
+//    }];
+//    self.collectionview.autoresizingMask = self.collectionview.autoresizingMask ^ UIViewAutoresizingFlexibleWidth;
+//    
+//    self.showDetail = true;
+//    
+//    
+//    NSArray* a= self.childViewControllers;
+//    
+//    for (int i=0;i<a.count;i++)
+//    {
+//        if([a[i] isKindOfClass:[DetailViewController class]])
+//        {
+//            DetailViewController *detailvc=a[i];
+//            detailvc.category_id = nil;
+//            detailvc.product_id = item_id;
+//            detailvc.ispush=false;
+//            [detailvc reload];
+//        }
+//    }
     
     
     

+ 87 - 75
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -1557,31 +1557,43 @@
     [self.dataOperationQueue addOperation:operation];
 }
 
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
-    {
-       // self.orientation = orientation;
-        [self.collectionview.collectionViewLayout invalidateLayout];
-        DebugLog(@"routed");
-    }
-    
-    
-    
-    
-}
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+//    {
+//       // self.orientation = orientation;
+//        [self.collectionview.collectionViewLayout invalidateLayout];
+//        DebugLog(@"routed");
+//    }
+//    
+//    
+//    
+//    
+//}
+
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//
+//    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+//
+//    self.toOrientation = toInterfaceOrientation;
+//    [self.collectionview.collectionViewLayout invalidateLayout];
+//
+//}
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
-    
-    self.toOrientation = toInterfaceOrientation;
-    [self.collectionview.collectionViewLayout invalidateLayout];
-    
-}
 
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        
+        
+            self.toOrientation = [UIApplication sharedApplication].statusBarOrientation;
+        [self.collectionview.collectionViewLayout invalidateLayout];
+    }];
+}
 /*
 #pragma mark - Navigation
 
@@ -2075,58 +2087,58 @@
     [self.navigationController pushViewController:dvc animated:true];
     return;
     
-    //一下为detail嵌入当前窗口的方式
-    self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
-   // [self.collectionview.collectionViewLayout invalidateLayout];
-    [self.collectionview reloadData];
-    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
-    int width=175;
-    // int height;
-    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
-    {
-        width = 370;
-        //      height = 400;
-    }
-    else
-    {
-        UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
-        
-        flowLayout.scrollDirection= UICollectionViewScrollDirectionHorizontal;
-        //        [self.collectionview ] set
-        //      height = 251;
-        width = 180;
-    }
-    
-    
-    CGRect frame = CGRectMake(0, 48, self.view.bounds.size.width, 271);
-    
-    
-//    CGRect framedetail = CGRectMake(0,271 ,self.view.bounds.size.width,self.view.bounds.size.height-271);
-    
-    [UIView animateWithDuration:0.5 animations:^{
-        self.collectionview.frame=frame;
-   //     self.detailView.frame = framedetail;
-        //        self.cagegoryLabel.hidden = true;
-    }];
-    self.collectionview.autoresizingMask = self.collectionview.autoresizingMask ^ UIViewAutoresizingFlexibleWidth;
-    
-    self.showDetail = true;
-    
-    
-    NSArray* a= self.childViewControllers;
-    
-    for (int i=0;i<a.count;i++)
-    {
-        if([a[i] isKindOfClass:[DetailViewController class]])
-        {
-            DetailViewController *detailvc=a[i];
-            detailvc.category_id = nil;
-            detailvc.product_id = item_id;
-            detailvc.ispush=false;
-            [detailvc reload];
-        }
-    }
-    
+//    //一下为detail嵌入当前窗口的方式
+//    self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
+//   // [self.collectionview.collectionViewLayout invalidateLayout];
+//    [self.collectionview reloadData];
+//    UIInterfaceOrientation orientation =[UIApplication sharedApplication].statusBarOrientation;
+//    int width=175;
+//    // int height;
+//    if(orientation == UIDeviceOrientationLandscapeLeft ||orientation == UIDeviceOrientationLandscapeRight)
+//    {
+//        width = 370;
+//        //      height = 400;
+//    }
+//    else
+//    {
+//        UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
+//        
+//        flowLayout.scrollDirection= UICollectionViewScrollDirectionHorizontal;
+//        //        [self.collectionview ] set
+//        //      height = 251;
+//        width = 180;
+//    }
+//    
+//    
+//    CGRect frame = CGRectMake(0, 48, self.view.bounds.size.width, 271);
+//    
+//    
+////    CGRect framedetail = CGRectMake(0,271 ,self.view.bounds.size.width,self.view.bounds.size.height-271);
+//    
+//    [UIView animateWithDuration:0.5 animations:^{
+//        self.collectionview.frame=frame;
+//   //     self.detailView.frame = framedetail;
+//        //        self.cagegoryLabel.hidden = true;
+//    }];
+//    self.collectionview.autoresizingMask = self.collectionview.autoresizingMask ^ UIViewAutoresizingFlexibleWidth;
+//    
+//    self.showDetail = true;
+//    
+//    
+//    NSArray* a= self.childViewControllers;
+//    
+//    for (int i=0;i<a.count;i++)
+//    {
+//        if([a[i] isKindOfClass:[DetailViewController class]])
+//        {
+//            DetailViewController *detailvc=a[i];
+//            detailvc.category_id = nil;
+//            detailvc.product_id = item_id;
+//            detailvc.ispush=false;
+//            [detailvc reload];
+//        }
+//    }
+//    
 
     
     

+ 2 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/FunctionTestViewController.m

@@ -109,7 +109,8 @@ self.airPrinterController = [UIPrintInteractionController sharedPrintController]
     
     
     airPrinterController.showsNumberOfCopies=true;
-    airPrinterController.showsPageRange = true;
+    //10.0开始始终显示
+//    airPrinterController.showsPageRange = true;
     airPrinterController.showsPaperSelectionForLoadedPapers=true;
     
     void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/ScannerSettingViewController.h

@@ -29,7 +29,7 @@
 @property (strong, nonatomic) IBOutlet UILabel *appinfoLabel;
 @property (strong, nonatomic) IBOutlet UISwitch *auto_launch_switch;
 
-@property (nonatomic , copy) void (^onDismissVC)();
+@property (nonatomic , copy) void (^onDismissVC)(void);
 //@property (strong, nonatomic) NSString *scanApiVersion;
 @end
 

+ 7 - 7
RedAnt ERP Mobile/common/Functions/signature/SignatureView.m

@@ -789,13 +789,13 @@ static PPSSignaturePoint ViewPointToGL(CGPoint viewPoint, CGRect bounds, GLKVect
 }
 
 
-- (void)longPress:(UILongPressGestureRecognizer *)lp {
-    //注释regturn,可以打开长按清除
-    return;
-    
-//    [self signatureImage];
-    [self clear];
-}
+//- (void)longPress:(UILongPressGestureRecognizer *)lp {
+//    //注释regturn,可以打开长按清除
+//    return;
+//    
+////    [self signatureImage];
+//    [self clear];
+//}
 
 - (void)pan:(UIPanGestureRecognizer *)p {
     

+ 22 - 15
RedAnt ERP Mobile/common/Functions/signature/SignatureViewController.m

@@ -55,22 +55,22 @@
     EAGLContext *context = [[EAGLContext alloc]initWithAPI:kEAGLRenderingAPIOpenGLES2];
     
     
-    if(true||self.signature_ratio.width<=0||self.signature_ratio.height<=0)
+    if(true/*||self.signature_ratio.width<=0||self.signature_ratio.height<=0*/)
     {
         self.signatureView = [[SignatureView alloc] initWithFrame:self.view.frame context:context];
 //        self.signatureView= [[SignatureView alloc] initWithFrame:self.view.frame];
     }
-    else
-    {
-        CGRect rect=CGRectMake(5, 90, self.view.frame.size.width-10, self.view.frame.size.height-95);
-        
-        CGSize signatureView_size=CGSizeMake(rect.size.width, rect.size.width*self.signature_ratio.height/self.signature_ratio.width);
-        
-        if(signatureView_size.height>rect.size.height)
-            signatureView_size=CGSizeMake(rect.size.height*self.signature_ratio.width/self.signature_ratio.height,rect.size.height);
-        
-        self.signatureView= [[SignatureView alloc] initWithFrame:CGRectMake((rect.size.width-signatureView_size.width)/2+5, (rect.size.height-signatureView_size.height)/2+90, signatureView_size.width, signatureView_size.height)];
-    }
+//    else
+//    {
+//        CGRect rect=CGRectMake(5, 90, self.view.frame.size.width-10, self.view.frame.size.height-95);
+//        
+//        CGSize signatureView_size=CGSizeMake(rect.size.width, rect.size.width*self.signature_ratio.height/self.signature_ratio.width);
+//        
+//        if(signatureView_size.height>rect.size.height)
+//            signatureView_size=CGSizeMake(rect.size.height*self.signature_ratio.width/self.signature_ratio.height,rect.size.height);
+//        
+//        self.signatureView= [[SignatureView alloc] initWithFrame:CGRectMake((rect.size.width-signatureView_size.width)/2+5, (rect.size.height-signatureView_size.height)/2+90, signatureView_size.width, signatureView_size.height)];
+//    }
     
 //    self.signatureView.backgroundColor = [UIColor clearColor];
     
@@ -299,8 +299,15 @@
 }
 */
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    self.signatureView.frame = self.view.bounds;
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    self.signatureView.frame = self.view.bounds;
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        self.signatureView.frame = self.view.bounds;
+    }];
 }
-
 @end

+ 26 - 9
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -1326,21 +1326,38 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 #pragma mark - rotation
 
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    self.sortItemController.view.frame = self.view.bounds;
+//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//    self.sortItemController.view.frame = self.view.bounds;
+//}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        self.sortItemController.view.frame = self.view.bounds;
+//        self.sortItemController.view.frame = self.view.bounds;
+        self.qtyLabel.frame = CGRectMake(self.itemListTable.bounds.size.width - 200, 5.5, 40, 22);
+    }];
 }
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//    return YES;
+//}
+
+- (BOOL)shouldAutorotate
+{
     return YES;
 }
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    self.sortItemController.view.frame = self.view.bounds;
-    self.qtyLabel.frame = CGRectMake(self.itemListTable.bounds.size.width - 200, 5.5, 40, 22);
 
-}
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//
+//    self.sortItemController.view.frame = self.view.bounds;
+//    self.qtyLabel.frame = CGRectMake(self.itemListTable.bounds.size.width - 200, 5.5, 40, 22);
+//
+//}
 
 #pragma mark - Action
 

+ 16 - 4
RedAnt ERP Mobile/common/JKLock/JKLockController.m

@@ -68,14 +68,26 @@
     // Dispose of any resources that can be recreated.
 }
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//    return YES;
+//}
+-(BOOL) shouldAutorotate
+{
     return YES;
 }
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    [self configAppearance];
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+         [self configAppearance];
+    }];
 }
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//    [self configAppearance];
+//}
 
 - (void)clearView {
     for (UIView *view in self.view.subviews) {

+ 16 - 7
RedAnt ERP Mobile/common/PhotoList/Controller/ContentPreviewController.m

@@ -96,15 +96,24 @@
     });
 }
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-    // 重新布局 Item 大小
-    [self.previewContainer.collectionViewLayout invalidateLayout];
 
-    // 重新布局Item位置
-//    [self.previewContainer scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:self.currentIndex inSection:0] atScrollPosition:32 animated:NO];
-//    [self scrollToIndex:self.currentIndex + 1];
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        [self.previewContainer.collectionViewLayout invalidateLayout];
+    }];
 }
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//    // 重新布局 Item 大小
+//    [self.previewContainer.collectionViewLayout invalidateLayout];
+//
+//    // 重新布局Item位置
+////    [self.previewContainer scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:self.currentIndex inSection:0] atScrollPosition:32 animated:NO];
+////    [self scrollToIndex:self.currentIndex + 1];
+//}
 
 - (BOOL)prefersStatusBarHidden {
     return YES;

+ 4 - 4
RedAnt ERP Mobile/common/categoryMenu_RATree/RATreeView+Enums.m

@@ -56,8 +56,8 @@
       return RATreeViewCellSeparatorStyleNone;
     case UITableViewCellSeparatorStyleSingleLine:
       return RATreeViewCellSeparatorStyleSingleLine;
-    case UITableViewCellSeparatorStyleSingleLineEtched:
-      return RATreeViewCellSeparatorStyleSingleLineEtched;
+//    case UITableViewCellSeparatorStyleSingleLineEtched:
+//      return RATreeViewCellSeparatorStyleSingleLineEtched;
     default:
       return RATreeViewCellSeparatorStyleNone;
   }
@@ -70,8 +70,8 @@
       return UITableViewCellSeparatorStyleNone;
     case RATreeViewCellSeparatorStyleSingleLine:
       return UITableViewCellSeparatorStyleSingleLine;
-    case RATreeViewCellSeparatorStyleSingleLineEtched:
-      return UITableViewCellSeparatorStyleSingleLineEtched;
+//    case RATreeViewCellSeparatorStyleSingleLineEtched:
+//      return UITableViewCellSeparatorStyleSingleLineEtched;
     default:
       return UITableViewCellSeparatorStyleNone;
   }

+ 3 - 2
RedAnt ERP Mobile/common/categoryMenu_RATree/RATreeView.h

@@ -38,8 +38,9 @@ typedef enum {
 
 typedef enum RATreeViewCellSeparatorStyle {
   RATreeViewCellSeparatorStyleNone = 0,
-  RATreeViewCellSeparatorStyleSingleLine,
-  RATreeViewCellSeparatorStyleSingleLineEtched
+  RATreeViewCellSeparatorStyleSingleLine
+//    ,
+//  RATreeViewCellSeparatorStyleSingleLineEtched
 } RATreeViewCellSeparatorStyle;
 
 typedef enum RATreeViewScrollPosition {

+ 8 - 8
RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.m

@@ -128,8 +128,8 @@ CGFloat buttonSpacerHeight = 0;
     [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut
 					 animations:^{
 						 self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4f];
-                         dialogView.layer.opacity = 1.0f;
-                         dialogView.layer.transform = CATransform3DMakeScale(1, 1, 1);
+                         self->dialogView.layer.opacity = 1.0f;
+                         self->dialogView.layer.transform = CATransform3DMakeScale(1, 1, 1);
 					 }
 					 completion:NULL
      ];
@@ -172,8 +172,8 @@ CGFloat buttonSpacerHeight = 0;
     [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone
 					 animations:^{
 						 self.backgroundColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f];
-                         dialogView.layer.transform = CATransform3DConcat(currentTransform, CATransform3DMakeScale(0.6f, 0.6f, 1.0));
-                         dialogView.layer.opacity = 0.0f;
+                         self.dialogView.layer.transform = CATransform3DConcat(currentTransform, CATransform3DMakeScale(0.6f, 0.6f, 1.0));
+                         self.dialogView.layer.opacity = 0.0f;
 					 }
 					 completion:^(BOOL finished) {
                          for (UIView *v in [self subviews]) {
@@ -366,7 +366,7 @@ CGFloat buttonSpacerHeight = 0;
 
     [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone
                      animations:^{
-                         dialogView.transform = rotation;
+        self->dialogView.transform = rotation;
                          
                      }
                      completion:nil
@@ -385,7 +385,7 @@ CGFloat buttonSpacerHeight = 0;
                          CGSize dialogSize = [self countDialogSize];
                          CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
                          self.frame = CGRectMake(0, 0, screenWidth, screenHeight);
-                         dialogView.frame = CGRectMake((screenWidth - dialogSize.width) / 2, (screenHeight - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
+        self->dialogView.frame = CGRectMake((screenWidth - dialogSize.width) / 2, (screenHeight - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
                      }
                      completion:nil
      ];
@@ -424,7 +424,7 @@ CGFloat buttonSpacerHeight = 0;
 
     [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone
 					 animations:^{
-                         dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
+        self->dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
 					 }
 					 completion:nil
 	 ];
@@ -437,7 +437,7 @@ CGFloat buttonSpacerHeight = 0;
 
     [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone
 					 animations:^{
-                         dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
+                         self->dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
 					 }
 					 completion:nil
 	 ];

+ 4 - 3
RedAnt ERP Mobile/common/customUI/ImageScrollerView.m

@@ -430,10 +430,11 @@
     if (true /*_scrCenter.zoomScale > kImgZoomScaleMin*/) {
         //缩小
         [_scrCenter setZoomScale:kImgZoomScaleMin animated:YES];
-    }else{
-        //放大
-        [_scrCenter setZoomScale:kImgZoomScaleMax animated:YES];
     }
+//    else{
+//        //放大
+//        [_scrCenter setZoomScale:kImgZoomScaleMax animated:YES];
+//    }
 }
 /*
 // Only override drawRect: if you perform custom drawing.

+ 56 - 29
RedAnt ERP Mobile/common/customUI/ImageScrollerViewController.m

@@ -15,39 +15,66 @@
 
 @implementation ImageScrollerViewController
 
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-//    UIApplication * app = [UIApplication sharedApplication];
-//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-//    [appDelegate didRotated];
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
-    {
-        
-            int index = self.imgShowView.curIndex;
-        for(UIView* v in self.view.subviews)
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+////    UIApplication * app = [UIApplication sharedApplication];
+////    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+////    [appDelegate didRotated];
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
+//    {
+//
+//            int index = self.imgShowView.curIndex;
+//        for(UIView* v in self.view.subviews)
+//        {
+//            if(v.tag==199)
+//                [  v removeFromSuperview];
+//        }
+//
+//        self.imgShowView = [[ImageScrollerView alloc]
+//                              initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+42, self.view.frame.size.width, self.view.frame.size.height-84) //self.view.frame
+//                              withSourceData:_data
+//                              withIndex:index];
+//        self.imgShowView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
+//
+//        self.imgShowView.tag = 199;
+//        [self.view addSubview:self.imgShowView];
+//
+//    }
+//
+//
+//
+//
+//}
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        // what ever you want to prepare
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+            UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+        if (UIInterfaceOrientationIsLandscape(orientation)|| UIInterfaceOrientationIsPortrait(orientation))
         {
-            if(v.tag==199)
-                [  v removeFromSuperview];
+            
+                int index = self.imgShowView.curIndex;
+            for(UIView* v in self.view.subviews)
+            {
+                if(v.tag==199)
+                    [  v removeFromSuperview];
+            }
+            
+            self.imgShowView = [[ImageScrollerView alloc]
+                                  initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+42, self.view.frame.size.width, self.view.frame.size.height-84) //self.view.frame
+                                withSourceData:self->_data
+                                  withIndex:index];
+            self.imgShowView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
+            
+            self.imgShowView.tag = 199;
+            [self.view addSubview:self.imgShowView];
+            
         }
-        
-        self.imgShowView = [[ImageScrollerView alloc]
-                              initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+42, self.view.frame.size.width, self.view.frame.size.height-84) //self.view.frame
-                              withSourceData:_data
-                              withIndex:index];
-        self.imgShowView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
-        
-        self.imgShowView.tag = 199;
-        [self.view addSubview:self.imgShowView];
-        
-    }
-    
-    
-    
-    
+    }];
 }
 
-
 - (id)initWithSourceData:(NSMutableArray *)data withIndex:(NSInteger)index{
     
     self = [super init];

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

@@ -35,81 +35,81 @@
 
 
 
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-//    UIApplication * app = [UIApplication sharedApplication];
-//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
-//    [appDelegate didRotated];
-    
-    //    [CATransaction begin];
-    //    [CATransaction setAnimationDuration:0.5];
-    //    [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
-    //    //    [self updatePreviewLayerForOrientation:toInterfaceOrientation];
-    //    _previewLayer.position = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
-    //
-    //    //   self.backgroundView.highLightRect = CGRectInset(self.focusZone.frame,6,6);
-    //    _previewLayer.bounds = rect;
-    //
-    //    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    //    switch (orientation) {
-    //
-    //
-    //
-    //        case UIInterfaceOrientationPortrait:
-    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(0)];
-    //
-    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortrait;
-    //            break;
-    //        case UIInterfaceOrientationPortraitUpsideDown:
-    //            //[_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI)];
-    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortraitUpsideDown;
-    //            break;
-    //        case UIInterfaceOrientationLandscapeLeft:
-    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI/2)];
-    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeLeft;
-    //            break;
-    //        case UIInterfaceOrientationLandscapeRight:
-    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(-M_PI/2)];
-    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeRight;
-    //            break;
-    //        default:
-    //            break;
-    //    }
-    //    [CATransaction commit];
-    
-    // 2018.12.28 iPad Pro 11-inch位置不正确
-//    NSTimeInterval animationDuration = 0.30f;
-//    [UIView beginAnimations:nil context:nil];
-//    [UIView setAnimationDuration:animationDuration];
-//
-//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-//    if (UIInterfaceOrientationIsLandscape(orientation))
-//    {
-//
-//
-//        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
-//        self.buttonCamera.frame = CGRectMake(942,200,48,48);
-//        self.buttonUpload.frame = CGRectMake(942,363,48,48);
-//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
-//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
-//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
-//    }
-//    else
-//    {
-//        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
-//        self.buttonCamera.frame = CGRectMake(173,918,48,48);
-//        self.buttonUpload.frame = CGRectMake(635,918,48,48);
-//
-//    }
-//
-//    [UIView commitAnimations];
-    
-    
-    
-    
-    
-    
-}
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+////    UIApplication * app = [UIApplication sharedApplication];
+////    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+////    [appDelegate didRotated];
+//    
+//    //    [CATransaction begin];
+//    //    [CATransaction setAnimationDuration:0.5];
+//    //    [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+//    //    //    [self updatePreviewLayerForOrientation:toInterfaceOrientation];
+//    //    _previewLayer.position = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
+//    //
+//    //    //   self.backgroundView.highLightRect = CGRectInset(self.focusZone.frame,6,6);
+//    //    _previewLayer.bounds = rect;
+//    //
+//    //    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    //    switch (orientation) {
+//    //
+//    //
+//    //
+//    //        case UIInterfaceOrientationPortrait:
+//    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(0)];
+//    //
+//    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortrait;
+//    //            break;
+//    //        case UIInterfaceOrientationPortraitUpsideDown:
+//    //            //[_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI)];
+//    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationPortraitUpsideDown;
+//    //            break;
+//    //        case UIInterfaceOrientationLandscapeLeft:
+//    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(M_PI/2)];
+//    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeLeft;
+//    //            break;
+//    //        case UIInterfaceOrientationLandscapeRight:
+//    //            // [_previewLayer setAffineTransform:CGAffineTransformMakeRotation(-M_PI/2)];
+//    //            _previewLayer.connection.videoOrientation=AVCaptureVideoOrientationLandscapeRight;
+//    //            break;
+//    //        default:
+//    //            break;
+//    //    }
+//    //    [CATransaction commit];
+//    
+//    // 2018.12.28 iPad Pro 11-inch位置不正确
+////    NSTimeInterval animationDuration = 0.30f;
+////    [UIView beginAnimations:nil context:nil];
+////    [UIView setAnimationDuration:animationDuration];
+////
+////    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+////    if (UIInterfaceOrientationIsLandscape(orientation))
+////    {
+////
+////
+////        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
+////        self.buttonCamera.frame = CGRectMake(942,200,48,48);
+////        self.buttonUpload.frame = CGRectMake(942,363,48,48);
+////        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
+////        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
+////        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
+////    }
+////    else
+////    {
+////        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
+////        self.buttonCamera.frame = CGRectMake(173,918,48,48);
+////        self.buttonUpload.frame = CGRectMake(635,918,48,48);
+////
+////    }
+////
+////    [UIView commitAnimations];
+//    
+//    
+//    
+//    
+//    
+//    
+//}
 
 - (void)viewDidLoad {
     [super viewDidLoad];

+ 4 - 4
RedAnt ERP Mobile/common/customUI/RTLabel.h

@@ -40,10 +40,10 @@
 
 typedef enum
 {
-	RTTextAlignmentRight = kCTRightTextAlignment,
-	RTTextAlignmentLeft = kCTLeftTextAlignment,
-	RTTextAlignmentCenter = kCTCenterTextAlignment,
-	RTTextAlignmentJustify = kCTJustifiedTextAlignment
+	RTTextAlignmentRight = kCTTextAlignmentRight,
+	RTTextAlignmentLeft = kCTTextAlignmentLeft,
+	RTTextAlignmentCenter = kCTTextAlignmentCenter,
+	RTTextAlignmentJustify = kCTTextAlignmentJustified
 } RTTextAlignment;
 
 typedef enum

+ 5 - 5
RedAnt ERP Mobile/common/customUI/RTLabel.m

@@ -422,19 +422,19 @@
 		{
 			if ([value caseInsensitiveCompare:@"left"] == NSOrderedSame)
 			{
-				textAlignment = kCTLeftTextAlignment;
+				textAlignment = kCTTextAlignmentLeft;
 			}
 			else if ([value caseInsensitiveCompare:@"right"] == NSOrderedSame)
 			{
-				textAlignment = kCTRightTextAlignment;
+				textAlignment = kCTTextAlignmentRight;
 			}
 			else if ([value caseInsensitiveCompare:@"justify"] == NSOrderedSame)
 			{
-				textAlignment = kCTJustifiedTextAlignment;
+				textAlignment = kCTTextAlignmentJustified;
 			}
 			else if ([value caseInsensitiveCompare:@"center"] == NSOrderedSame)
 			{
-				textAlignment = kCTCenterTextAlignment;
+				textAlignment = kCTTextAlignmentCenter;
 			}
 		}
 		else if ([key caseInsensitiveCompare:@"indent"] == NSOrderedSame)
@@ -515,7 +515,7 @@
 	int lineBreakMode = _lineBreakMode;
 	int lineSpacing = (int)_lineSpacing;
 
-    textAlignment = kCTCenterTextAlignment;
+    textAlignment = kCTTextAlignmentCenter;
 	
 	CTParagraphStyleSetting theSettings[] =
 	{

+ 8 - 6
RedAnt ERP Mobile/common/iSalesNavigationController.m

@@ -49,13 +49,15 @@
     //    return UIInterfaceOrientationMaskLandscape;
     return [[self topViewController] supportedInterfaceOrientations];
 }
+//
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+//{
+//    return [[self topViewController] shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
+// //   return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
+//    
+//}
+
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
-{
-    return [[self topViewController] shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
- //   return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
-    
-}
 
 - (void)setNavigationBarHidden:(BOOL)navigationBarHidden {
     [super setNavigationBarHidden:navigationBarHidden];

+ 11 - 2
RedAnt ERP Mobile/common/photoStack/PhotoStackViewController.m

@@ -127,9 +127,18 @@
     [self setPageControl:nil];
     [super viewDidUnload];
 }
+//
+//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+//    return (interfaceOrientation == UIInterfaceOrientationPortrait);
+//}
+- (BOOL)shouldAutorotate
+{
+    return YES;
+}
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return (interfaceOrientation == UIInterfaceOrientationPortrait);
+-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
+    return UIInterfaceOrientationMaskPortrait;
 }
 
+
 @end

+ 3 - 3
common/NetworkUtils.m

@@ -573,7 +573,7 @@ repeat:
     return params;
 }
 
-+(NSData*)request_interface_d : (NSString*) url parameters:(NSMutableDictionary *) params  err_record_url:(NSString* )recorder_url completionHandler:(resultHandler)result retry:(int) retry
++(void)request_interface_d : (NSString*) url parameters:(NSMutableDictionary *) params  err_record_url:(NSString* )recorder_url completionHandler:(resultHandler)result retry:(int) retry
 {
 //    __block int retry = 0;
     
@@ -586,7 +586,7 @@ repeat:
                     result([[RAConvertor string2dict:[NSString stringWithFormat:@"{\"result\":%d}",RESULT_NET_NOTAVAILABLE]] mutableCopy]);
             });
     //        return detailContent;
-            return nil;
+            return ;
         }
 
     params = [self prepare_addtional_params:params];
@@ -810,7 +810,7 @@ repeat:
 //
          [dataTask resume];
          
-         return nil;
+         return ;
          
          
          

+ 1 - 0
common/WK PDF+Web/RAPDFViewController.m

@@ -627,6 +627,7 @@
     [mc addAttachmentData:data mimeType:@"application/pdf" fileName:filename];
     [self presentModalViewController:mc animated:YES];
     
+    
     return;
 }