Tomi Antoljak
Tomi Antoljak

Reputation: 11

Segue push is presenting modally

I created a segue push but it presents the screen modally. Any idea why?

Tried redoing the segue and restarting Xcode but no help there.

After I linked it up via Storyboard, I named the segue in my controller and called perform when button gets tapped.

@IBAction func heyoTapped(_ sender: UIButton) {
    
    performSegue(withIdentifier: "goToFriendList", sender: nil)
    
}

Upvotes: 1

Views: 60

Answers (1)

kamrul
kamrul

Reputation: 55

  1. Select your 1st VC
  2. Add navigation (Editor>Embed In> Navigation Controller.
  3. Make your Navigation controller as initial view controller.
  4. Connect your NextVC with segue (it will Push your new VC by default ), to make sure this you can select segue and make sure the “Kind” is selected as “Show (e.g. Push)”
  5. Now give a name to the segue and do your Perform Segue. [Please check all the images for visualisation

Upvotes: 2

Related Questions