Skip to content

Commit

Permalink
Ugly trick to manage navigationBarView appearing/disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanLage committed Mar 19, 2015
1 parent a68898b commit a835477
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SLPagingView/SLPagingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ -(void)viewWillAppear:(BOOL)animated{
[self notifyControllers:NSSelectorFromString(@"viewDidAppear:")
object:@(animated)
checkIndex:YES];
[self.navigationController.navigationBar addSubview:self.navigationBarView];
}

-(void)viewDidAppear:(BOOL)animated{
Expand All @@ -199,6 +200,7 @@ -(void)viewWillDisappear:(BOOL)animated{
[self notifyControllers:NSSelectorFromString(@"viewWillDisappear:")
object:@(animated)
checkIndex:YES];
[self.navigationBarView removeFromSuperview];
}

- (void)viewDidLoad{
Expand Down Expand Up @@ -384,7 +386,6 @@ -(void)setupPagingProcess{
if(self.tintPageControlColor) self.pageControl.pageIndicatorTintColor = self.tintPageControlColor;
[self.navigationBarView addSubview:self.pageControl];
}
[self.navigationController.navigationBar addSubview:self.navigationBarView];
}

// Add all views
Expand Down

0 comments on commit a835477

Please sign in to comment.