问题
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