prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6

泪湿孤枕 提交于 2019-12-28 06:24:26

问题


Using xcode 8 beta 6.

Type override func prepare and I see this ..

But I am looking for

prepare(for segue: UIStoryboardSegue, sender: AnyObject?)

Is this a bug? This class is a subclass of ViewController?


回答1:


Maybe this was a bug in Beta 6. I'm using the GM seed, and it is working:

BTW: In beta 6, the method was renamed to

prepare(for segue: UIStoryboardSegue, sender: Any?)


来源:https://stackoverflow.com/questions/39469915/preparefor-segue-uistoryboardsegue-sender-anyobject-missing-in-swift-3-0-x

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