29

This problem comes when I build an app targeting iOS 5 or 6, but run it on iOS 7. If I have a controller in a navigationController that is a part of a tabBarController, and I do the following:

controller.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:testController animated:YES];

A strange vertical positioning animation occurs. I would instead like the new controller (with the bottom bar hidden) to push or pop on the navigation controller pushing the tab bar out or bringing it back and with no vertical positioning changes.

Video of Issue: https://dzwonsemrish7.cloudfront.net/items/0K2z1J3U2H3w033G0k23/hidesBottomBarWhenPushed.mov

Open Radar Report: http://www.openradar.me/14670329

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 2
    Here's a solution http://stackoverflow.com/a/18960786/1228534 – graver Sep 23 '13 at 14:10
  • Why are you compiling against an old SDK? You can target older iOS versions while compiling against a newer SDK. Does this reproduce when compiling against iOS7 SDK? – Léo Natan Dec 05 '13 at 23:52
  • 11
    Starting with February 2014, you will no longer be able to submit apps or patches to the AppStore using SDK lower than iOS7. It is time to move on. – Léo Natan Dec 23 '13 at 05:16
  • 1
    You could still build apps for pre iOS7 versions after Feb-14. You just need to build it with Xcode 5 and iOS7 SDK. – Yas Tabasam Jan 16 '14 at 23:15
  • 1
    this ios 7 problem, you can use custom animation: check this one: http://stackoverflow.com/a/18882232/2071021 – Darshit Shah Jan 23 '14 at 10:22
  • @LeoNatan having said that, you can build with iOS 7 SDK and still deploy it to iOS 6. So this is still a relevant problem to solve. – Enrico Susatyo Jan 24 '14 at 12:34
  • @EnricoSusatyo The problem is when compiling against and old SDK and running on iOS7. The problem does not occur when running on an old iOS. If the code is compiled against the iOS7 SDK, this problem does not occur on new or old iOS. – Léo Natan Jan 24 '14 at 13:05

6 Answers6

2

You can always remove animation from the UIView with

[self.view.layer removeAllAnimations];

Cheers

Göktuğ Aral
  • 1,409
  • 1
  • 13
  • 28
Sundeep Saluja
  • 1,089
  • 2
  • 14
  • 36
0

Try This:

[self.navigationController.navigationBar setHidden:NO];
KyleMit
  • 30,350
  • 66
  • 462
  • 664
0

If you want to keep transparency, add this to the root UIViewController:

- (void)viewWillAppear:(BOOL)animated {
    [UIView animateWithDuration:0.35f animations:^{
        self.tabBarController.tabBar.alpha = 1.0f;
    }];
}

- (void)viewWillDisappear:(BOOL)animated {
    [UIView animateWithDuration:0.35f animations:^{
        self.tabBarController.tabBar.alpha = 0.0f;
    }];
}

This way you'll get a nice fade-in/fade-out animation of the tab bar.

nikolovski
  • 4,049
  • 1
  • 31
  • 37
-1

Try this

if( [self respondsToSelector:@selector(setEdgesForExtendedLayout:)] )
{
    self.edgesForExtendedLayout=UIRectEdgeNone;
}
Gopal Raju
  • 246
  • 3
  • 12
-1

this says you should put:

self.navigationController.navigationBar.translucent = NO;

follow this link

Community
  • 1
  • 1
Jasmin
  • 794
  • 7
  • 18
-1

Just set the translucent property to NO for both navigation bar and tabBarController. This will solve your problem.

Chetan
  • 2,004
  • 1
  • 13
  • 21