How to code for a specific view contoller? - Apple Swift/Xcode

心已入冬 提交于 2021-01-29 15:38:53

问题


I am trying to code a basic calculator for a specific view controller in my project, but I don't know the function to call my specific view controller.

I expect to be able to connect my outlets, but I can tell that it has to be in the scope of a specific function. I am unable to connect an outlet from any view controller other than the root.

I'm a student, and I've tried to look up function names for a specific ViewController, but I cannot find the right result.

Thanks in advance!


回答1:


first of all you have to make different name just like: ViewController CalculatorViewController and then you have to link this controller with its own screen like the image below:

and after that you will be able to link your outlets easily



来源:https://stackoverflow.com/questions/65115408/how-to-code-for-a-specific-view-contoller-apple-swift-xcode

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