Bläddra i källkod

20170221

Fix homepage orientation
Ray Zhang 9 år sedan
förälder
incheckning
f6f1231a7c

+ 2 - 0
RedAnt ERP Mobile/common/Functions/home/HomeViewController.h

@@ -26,6 +26,8 @@
 @property (strong,nonatomic) NSDictionary* content;
 @property (strong,nonatomic) NSDictionary* bak_content;
 @property (strong, nonatomic) id expanded;
+
+@property (assign, nonatomic) CGSize ori_size;
 //@property (strong,nonatomic) NSDictionary*
 //@property (strong,nonatomic) NSMutableArray * arr_topicView;
 //-(void)topicViewSelected:(int) type _id: (int) _id;

+ 7 - 0
RedAnt ERP Mobile/common/Functions/home/HomeViewController.m

@@ -52,11 +52,18 @@
 {
     [super viewWillAppear:animated];
     [[self navigationController] setNavigationBarHidden:YES animated:NO];
+    
+    if(!CGSizeEqualToSize(self.ori_size, [[UIScreen mainScreen] applicationFrame].size))
+    {
+            [self.homeTable reloadData];
+    }
 //    self.content = self.bak_content;
 //    [self reload_container_getdata:false];
 }
 -(void) viewWillDisappear:(BOOL)animated
 {
+    
+    self.ori_size=[[UIScreen mainScreen] applicationFrame].size;
 //                                            [[NSNotificationCenter defaultCenter] postNotificationName:CYCLESCROLL_STOPTIMMER object:nil];
 //    self.bak_content = self.content;
 //    self.content= nil;