0

No matter what I do, the segue kind is always present modally (one vc on top an other). This is even when it is not set to it. At the moment my segue is set to "Show" but even still, the bar at the top of the view controller is still there and when I run the app it does the present modally over the top animation. I don't know where to go from here!!

Reseting my computer. Reinstalling Xcode. Different ways of showing the vc.

This is what I mean by white bar at top

2 Answers2

0

Update: I have seen your screenshot update to the question and I would like to point out that the issue that you are trying to solve has nothing to do with modal presentations. The content of the ‘view’ of a ‘UIViewController’ does not fill the screen because it’s constrained either to the Safe Area or the margins of the its superview.

Initial answer:

Lol but that’s a feature and not a bug. The “Show” setting that you are talking about only controlls the animation. In order to discard all instantiated modal presentation contexts you have to swap out the ‘rootViewController’ of the ‘UIWindow’ in which this contexts exist.

Please note that storyboard segues feature no support for this in UIKit.

Please note that usage of storyboard segues is an ill practice and should be considered deprecated. The primary reason for this is that it prevents programmer from establishing a proper routing layer in the application leading to a rapidly increasing technical debt.

Isaaс Weisberg
  • 2,296
  • 2
  • 12
  • 28
0

The reason is that Show has a complex meaning. It means:

"If our parent is a UINavigationController, push. Otherwise, present modally."

Well, your parent is not a UINavigationController. There is no UINavigationController anywhere around! So Show ends up meaning exactly the same thing as Present / Modal.

matt
  • 515,959
  • 87
  • 875
  • 1,141