I am new to IOS App development and have a question. I'm trying to segue from one view controller to another. However, it seems that every time I ctrl+drag from the options button to the adjacent view controller and choose the 'show' option, the view controller "shifts" down(bottom picture). Why does that happen and if it is not the correct behavior, how can I do it right? Thanks!
-
Select your `ViewController` and check `Top Bar` property in Attributes Inspector. – Jan 22 '20 at 05:38
3 Answers
You need to set fullscreen style manually if select model style, a fullscreen option did not show in Push type, you must use Navigation Controller if you want to set fullscreen for Push https://i.stack.imgur.com/rg20Y.png

- 73
- 5
When you click on the segue(the line that connects view controllers) and open the Attribute Inspector in right panel, you will see the Kind
is set to Present Modally
. This means your view controller will popup on your current screen.
You can change the Kind
to Push
and it will start showing normally.
Also embed your controller in a navigation Controller
Option 2
If you dont want a navigation controller, you can also change the presentation to full screen.

- 5,045
- 1
- 18
- 38
If you're new to iOS
then I might suggest don't use show
and don't use segue
from storyboard
If you don't know the concept of navigation controller (push
and pop
methods), then have a look at it (You may not use show
afterwards)
have a look at following link
Swift programmatically navigate to another view controller/scene

- 1,078
- 1
- 8
- 30