Closed KanybekMomukeyev closed 9 years ago
Do you show the navbar when the controller disappars?
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self showNavBarAnimated:NO];
}
@andreamazz, yes i did.
You are referring to the nav controller's rootViewController... are you using the push segue or are you manually changing the root?
when using like this one: [self.navigationController setViewControllers:@[self.someViewController] animated:NO];
and like this one [self.navigationController popViewController]; here root controller is TableViewController(scrollabe), also appears this issue
I'm not sure if setViewControllers:
fires the viewWillDisappear call in the child that's being removed. try calling the showNavbar: method before changing root:
[self.oldViewController showNavBarAnimated:NO];
[self.navigationController setViewControllers:@[self.someViewController] animated:NO];
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 40;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
self.headerView.headerTitleLabel.text = [SIActualDataManager sharedInstance].tableHeaderTitle;
return self.headerView;
}
I removed header view for tableView, and everything working best!
Glad to hear that! :+1:
Using AMScrollingNavbar with UITableViewController, some times appears black header on top. There also UISearchBar. Used this one, no changes, have the latest version: [self setUseSuperview:NO];
Top viewController is UINavigationController, root view controller is UITableViewController which uses scroll navbar, when user press some button, root view controller is moved to UIViewController. If user wants to return to UITableViewController, which will be as root view controller, this issue happens.