0

I was able to create a custom popover and added some button, but when I tried to connect it with a segue, it doesn't appear.

Is there any solution for this?

I tried using this code:

@IBAction func WishlistView(sender: AnyObject) {
     self.presentViewController(WishlistViewController(), animated: true, completion: nil)
}

Hopefully, someone will answer this.

Thanks!

boraseoksoon
  • 2,164
  • 1
  • 20
  • 25

1 Answers1

0

You should use performSegue(withIdentifier: "segueIdentifier", sender: self), if your don't know how to assign identifier for a segue, check this answer.

So your code should be like:

Swift 2:

@IBAction func WishlistView(sender: AnyObject) {
    self.performSegueWithIdentifier("segueIdentifier", sender: self)
}

Swift 3:

@IBAction func WishlistView(sender: AnyObject) {
    performSegue(withIdentifier: "segueIdentifier", sender: self)
}

Hope that helped.

Community
  • 1
  • 1
Ahmad F
  • 30,560
  • 17
  • 97
  • 143
  • When i tried to add connection/segue the controller became small same size with the popover, i used push, when i use the modal segue navigation bar disappears, I use the popover to serve as "picker of action" – Mark Anthony Co Oct 12 '16 at 01:30