如何为特定的视图控制器编码?- 苹果 Swift/Xcode [英] How to code for a specific view contoller? - Apple Swift/Xcode
问题描述
我正在尝试为项目中的特定视图控制器编写一个基本的计算器,但我不知道调用特定视图控制器的函数.
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.
我是一名学生,我尝试查找特定 ViewController 的函数名称,但找不到正确的结果.
I'm a student, and I've tried to look up function names for a specific ViewController, but I cannot find the right result.
提前致谢!
推荐答案
首先你必须像这样:视图控制器计算器视图控制器然后您必须将此控制器与其自己的屏幕链接,如下图所示:
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
这篇关于如何为特定的视图控制器编码?- 苹果 Swift/Xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!