that method worked for me with out adding it in the .h file.
But I am using this way to hide
Code:
//Load the view
AddViewController *aController = [[AddViewController alloc] init];
//Set the view title
aController.title = @"Add View";
//hide tabbar
aController.hidesBottomBarWhenPushed = YES;
//add it to stack.
[[self navigationController] pushViewController:aController animated:YES];