How to perform conditional segue

后端 未结 1 638
死守一世寂寞
死守一世寂寞 2021-01-27 07:47

I\'ve created a segue through IB. When buttonA is clicked, a transition to viewB will occur.

In the button click action, I have performSegue(withIdentifier:sender

相关标签:
1条回答
  • 2021-01-27 08:16

    You have created segue from the UIButton to a viewController that is the reason segue happens before the execution of condition. Instead of that remove that segue from storyboard and create another from your ViewController to DestinationViewController.

    0 讨论(0)
提交回复
热议问题