Text Field creates action not outlet

谁都会走 提交于 2021-02-07 12:45:38

问题


I'm working on my first app with multiple view screens and everything worked great on the first view, I added a couple text fields and was able to connect them to the controller as Outlets and obtain the value from them, manage it and spit it back out to a label.

I tried control-dragging the text fields on the second view to the secondControllerView and the only thing available when I do so is Action, no outlet, so its a function not a variable and I also cannot connect the labels to the code at all!

Anyone know why?


回答1:


Make sure in the identity inspector you selected the class for the UIViewController you are connecting your outlets to.



来源:https://stackoverflow.com/questions/48085341/text-field-creates-action-not-outlet

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