Swift: prepareForSegue with two different segues

后端 未结 5 943
旧时难觅i
旧时难觅i 2021-01-04 19:29

I have 2 UIButtons on a view. Each of them are linked to 2 different views. They have to pass different data depending which button you just tapped.

I k

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 19:50

    You should compare the segue.identifier with the string not segue:

    segue.identifier == "historySegue"

    It won't fix your problem but it helps later.

    I believe you have added an breakpoint and your app just stop at it. Remove the breakepoint and it will work.

提交回复
热议问题