Not exactly what you want but surely this answer will help someone.
If you want to change the bottom-border(shadow) color of UINavigationBar or UIToolbar instead of hiding it, you should set the background image and shadow image to your bar.
For changing the the UINavigationBar's bottom-border(shadow)
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"yourImageName"] forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[UIImage imageNamed:@"yourImageName"]];
For changing the the UIToolbar's bottom-border(shadow)
[yourToolBar setBackgroundImage:[UIImage imageNamed:@"yourImageName"]
forToolbarPosition:UIBarPositionBottom
barMetrics:UIBarMetricsDefault];
[yourToolBar setShadowImage:[UIImage imageNamed:@"yourImageName"]
forToolbarPosition:UIBarPositionBottom];