diff --git a/XLPagerTabStrip/Demo/NavButtonBarExampleViewController.m b/XLPagerTabStrip/Demo/NavButtonBarExampleViewController.m index f4d4e2d..7dc2962 100644 --- a/XLPagerTabStrip/Demo/NavButtonBarExampleViewController.m +++ b/XLPagerTabStrip/Demo/NavButtonBarExampleViewController.m @@ -39,7 +39,7 @@ [self.buttonBarView setBackgroundColor:[UIColor clearColor]]; [self.buttonBarView.selectedBar setBackgroundColor:[UIColor orangeColor]]; - [self.navigationItem setTitleView:self.buttonBarView]; + [self.navigationController.navigationBar addSubview:self.buttonBarView]; [self.buttonBarView registerNib:[UINib nibWithNibName:@"ButtonCell" bundle:nil] forCellWithReuseIdentifier:@"Cell"]; }