Segue push is presenting modally

37 views Asked by At

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)
    
}
1

There are 1 answers

0
kamrul On
  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