siliconchris siliconchris - 11 months ago 43
iOS Question

Swift "show segue" is not available when Ctrl Drag a button on View Controller

I'm having a very hard time here.

I created an iOS App in which I have a Navigation controller and a main screen showing a device list and now I'd like to add a detailed view. My issue is, I can't create a segue with action "Show" - the Interface Builds in Xcode only provides options "Push", "Modal" and "Custom"

I'm an absolute beginner in Swift (or for that Apple) development and each and every tutorial I found with google, says, I'd simply have to Ctrl-Click the button, drag it to the new view controller and choose "show" - but there is no :-(

I'm attaching a picture, so you might see more clearly. Screenshot trying to create action

Please, if someone could help me out here.

Is my problem caused by choosing Single View Application in the project???

I'm using Xcode 8, Swift 3 and developing for iOS 10 on iPhone

Answer Source

You are likely using the old Xcode storyboard layout, to go back to modern layout:

select Main.storyboard, go to identity inspector and check the Use Auto Layout and Use Trait Variations boxes.

enter image description here