Can a viewcontroller access the identifier of an incoming segue?

爱⌒轻易说出口 提交于 2019-12-20 05:39:20

问题


Can a viewcontroller access the identifier of the segue that was used to transition to it? For example, I transition from viewcontroller A to viewcontroller B using a segue with the identifier "mySegue". Is there anyway for viewcontroller B to get the segue's identifier?


回答1:


I don't believe there is such a property. This kind of thing should be handled via the calling VC's prepareForSegue:sender method (as said in the comments) and then assigning a custom property to denote where it came from, etc.



来源:https://stackoverflow.com/questions/10629399/can-a-viewcontroller-access-the-identifier-of-an-incoming-segue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!