fix #59
This commit is contained in:
parent
033b6561fe
commit
93d8581557
|
|
@ -50,6 +50,16 @@ NSString *const kCellIdentifier = @"PostCell";
|
|||
[self.tableView registerClass:[PostCell class] forCellReuseIdentifier:kCellIdentifier];
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
|
|
|
|||
|
|
@ -106,12 +106,12 @@
|
|||
-(void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
_lastSize = self.containerView.bounds.size;
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
_lastSize = self.containerView.bounds.size;
|
||||
[self updateIfNeeded];
|
||||
}
|
||||
|
||||
|
|
@ -285,8 +285,13 @@
|
|||
-(void)updateContent
|
||||
{
|
||||
if (!CGSizeEqualToSize(_lastSize, self.containerView.bounds.size)){
|
||||
_lastSize = self.containerView.bounds.size;
|
||||
[self.containerView setContentOffset:CGPointMake([self pageOffsetForChildIndex:self.currentIndex], 0) animated:NO];
|
||||
if (_lastSize.width != self.containerView.bounds.size.width){
|
||||
_lastSize = self.containerView.bounds.size;
|
||||
[self.containerView setContentOffset:CGPointMake([self pageOffsetForChildIndex:self.currentIndex], 0) animated:NO];
|
||||
}
|
||||
else{
|
||||
_lastSize = self.containerView.bounds.size;
|
||||
}
|
||||
}
|
||||
NSArray * childViewControllers = self.pagerTabStripChildViewControllers;
|
||||
self.containerView.contentSize = CGSizeMake(CGRectGetWidth(self.containerView.bounds) * childViewControllers.count, self.containerView.contentSize.height);
|
||||
|
|
|
|||
Loading…
Reference in New Issue