tushar
tushar

Reputation: 323

ViewController not performing segue as expected

After installing Xcode 11, I started to face this issue. I am trying to segue from LandingViewController to LoginViewController on button click event. The view controller doesn't load in full screen and appears as a popover.

I have tried to instantiate the VC and still no luck. Also I tried directly linking the Login button and the vc but still it was unsuccessful.

 self.performSegue(withIdentifier: "1", sender: nil)

segued vc -1

segued vc -2

Upvotes: 0

Views: 342

Answers (3)

Dot.Volare
Dot.Volare

Reputation: 118

An alternative solution to the given ones:

You can instantiate storyboard and targeted view controller in prepare for segue and then:

let VC: yourViewClass = segue.destination as! yourViewClass
VC.modalPresentationStyle = .fullScreen

Upvotes: 1

Dipika
Dipika

Reputation: 1127

For more info have a look at View Controller Presentation Style Changes in iOS13

Upvotes: 0

Gori
Gori

Reputation: 347

As of iOS 13 and Xcode 11, the default presentation mode is no longer fullscreen. If you still want to use fullscreen mode, got to InterfaceBuilder and set the presentation of the viewcontroller to Full Screen, like this:

Fullscreen setting

Upvotes: 1

Related Questions