So I've been getting these black flashes when I segue from one view controller to another in my app. I don't understand what causes this.
Asked
Active
Viewed 2,899 times
7
-
Possible duplicate of [Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1](https://stackoverflow.com/questions/22413193/dark-shadow-on-navigation-bar-during-segue-transition-after-upgrading-to-xcode-5) – Sti Oct 03 '17 at 15:44
-
can you give the snapshot of your iPhone's home screen – rd_ Oct 03 '17 at 15:44
-
Stackoverflow won't let me post images directly yet, but the link in the question shows it in a gif. – Joseph Camuso Oct 03 '17 at 21:05
2 Answers
15
It looks like you navigation controller's view backgroundColor is black. Either set it to your desired color, probably white:
navigationController?.view.backgroundColor = .white
or set your view controllers to extend edges, so the view of your view controller extends all the way under the navigation bar:
edgesForExtendedLayout = .all // or .top

Au Ris
- 4,541
- 2
- 26
- 53
-
-
The second one helped with a white gap flickering in the navigation bar. Thank you! – CocoaNuts Aug 24 '19 at 10:18
1
Somewhere in the view hierarchy is a view with a black background. Use the view debugger in Xcode to find it, but it could possibly be your window or the navigation controller's view.

jrturton
- 118,105
- 32
- 252
- 268