|
@@ -222,23 +222,39 @@ const int delta = 25;
|
|
|
// Dispose of any resources that can be recreated.
|
|
// 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
|
|
#pragma mark - TableView DataSource
|
|
|
|
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|