Преглед на файлове

1.修改iOS Apex Mobile编译警告。

Pen Li преди 8 години
родител
ревизия
77da7029ba
променени са 3 файла, в които са добавени 39 реда и са изтрити 16 реда
  1. 5 2
      common/NetworkUtils.m
  2. 4 0
      common/customUI/Refresh/JLRefreshBasis.m
  3. 30 14
      common/customUI/ResultViewController.m

+ 5 - 2
common/NetworkUtils.m

@@ -230,8 +230,11 @@ repeat:
             {
                 jsobj = decryptBlock(jsobj);
             }
-            jsobj = resultBlock(jsobj);
-                    int result=[[jsobj valueForKey:@"result"] intValue];
+            if (resultBlock) {
+                jsobj = resultBlock(jsobj);
+            }
+            
+            int result=[[jsobj valueForKey:@"result"] intValue];
             if(![url isEqualToString:recorder_url]&&/*![url isEqualToString:URL_DOWNLOAD_OFFLINE]&&*/result!=2&&result!=99)
             {
                 [self err_log:[RAUtils base64en:[RAConvertor dict2string:params]] result:[RAUtils base64en:str] module:url code:result];

+ 4 - 0
common/customUI/Refresh/JLRefreshBasis.m

@@ -36,6 +36,10 @@ NSString *const JLRefreshKeyPathState = @"state";
     return self;
 }
 
+- (NSString *)refreshTitleForState:(JLRefreshState)state {
+    return nil;
+}
+
 - (void)prepareInterface {
     self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
     self.backgroundColor = [UIColor clearColor];

+ 30 - 14
common/customUI/ResultViewController.m

@@ -222,23 +222,39 @@ const int delta = 25;
     // Dispose of any resources that can be recreated.
 }
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    
-}
--(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
-{
-    // auto resizing
-//    self.scrollview.contentSize=self.tableview.frame.size;
+//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+//    
+//}
+//-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+//{
+//    // auto resizing
+////    self.scrollview.contentSize=self.tableview.frame.size;
+//    
+//    // auto layout
+////    int width=[self.content_layout[@"header"][@"width"] intValue];
+////    if(width<self.view.frame.size.width)
+////        width=self.view.frame.size.width;
+////    self.w_constraint.constant = width - CGRectGetWidth(self.view.bounds);
+////    self.h_constraint.constant = 0;
+//    [self updateTableFrame];
+//    
+//}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
     
-    // auto layout
-//    int width=[self.content_layout[@"header"][@"width"] intValue];
-//    if(width<self.view.frame.size.width)
-//        width=self.view.frame.size.width;
-//    self.w_constraint.constant = width - CGRectGetWidth(self.view.bounds);
-//    self.h_constraint.constant = 0;
-    [self updateTableFrame];
+    __weak typeof(self) weakSelf = self;
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        
+        // 动画前
+    } completion:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        
+        // 动画后
+        [weakSelf updateTableFrame];
+    }];
     
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
 }
+
 #pragma mark - TableView DataSource
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {