I am buidling a very simple look up app. The first screen of the app is doing a horizontal flip animation. I have done this using a storyboard. There is no code implemented to have this animated. It looks great, however I have a black gap between the title bar and table view. Note, I don't have any code in viewDidLoad
or viewWillAppear
. Any idea why it is ending up with this gap? The gap closes after the view finishes loading.
Asked
Active
Viewed 157 times
2
-
I just noticed I have the same problem and I'm having a brain fart on how to fix it. Any solutions? – Matt Nov 24 '13 at 20:46
-
No mate i am still waiting for an answer... – Bill Nov 24 '13 at 22:43
-
Which version of iOS / Xcode is this on? Can you show the Storyboard so I can see how to recreate it. – Fogmeister Oct 20 '14 at 11:25
-
I have the same problem. I just tried to recreate it with Xcode 6 storyboards with size-classes but wasn't able to. My non-working version is compiled with iOS 7.1 as Base SDK, an iPhone-only storyboard with a simple button that transitions with a modal presentation (transition:"Flip horizontally") from a standard view controller to a navigation controller containing a standard view controller. – Joachim Kurz Oct 20 '14 at 11:39
-
One more thing: I only have the black bar when animation to the navigation controller, not when animating back to the original view controller, also it just looks like a reverse animation. – Joachim Kurz Oct 20 '14 at 11:43
-
Regarding the Xcode version: I'm compiling with Xcode 6 by now, but the project was created with Xcode 5. I'm not able to recreate the problem in a new project, but it persists in an existing one, even when using Xcode 6. – Joachim Kurz Oct 20 '14 at 11:47
-
@Fogmeister I managed to reproduce it with Xcode 6. The missing part was to make the navigation bar of the backside navigation controller be non-transparent (deactivated checkmark in storyboard). I did this in my original project as the transparent case made the complete bar black during the animation, so making it non-transparent was an improvement. You can find the project here and play around with it: https://github.com/JoachimKurz/FlipApp – Joachim Kurz Oct 20 '14 at 13:03
1 Answers
0
You can avoid the problem by stopping the navigation bar from animating in. If that is a suitable solution for you, you can stop the navigation bar's animation following the solution in a similar question:
Override viewWillAppear in the view controller you are transitioning to, like so:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController.navigationBar.layer removeAllAnimations];
}
However, this is only a workaround not a proper solution for the root cause, I think.

Community
- 1
- 1

Joachim Kurz
- 2,875
- 6
- 23
- 43
-
Was it created in a xib? I know this possibly isn't a solution but have you "updated" the xib to be an Xcode 6 only xib? – Fogmeister Oct 20 '14 at 12:40
-
Yes, it's all setup in a storyboard, no code to do the animation (apart from the bit added in this answer). I'm not sure what you mean by "upgraded to Xcode 6 only". The IB-Version displayed in the inspector ("Opens in") is Xcode 6. But it doesn't use size classes yet. – Joachim Kurz Oct 20 '14 at 12:44
-