我的第一个 xcode 视图控制器与其他视图控制器不同.为什么? [英] My first xcode view controller does not act like the others. Why?
问题描述
现在我有这张照片.
它显示我能够使用根视图控制器将按钮拖到 viewcontroller.swift 中.
Right now I have this picture.
It shows me being able to drag the button into viewcontroller.swift Using the root View Controller.
接下来请看这张图.
这张图片显示我无法使用我的第三个视图控制器将按钮拖到 viewcontroller.swift 中.
Next please take a look at this picture.
This picture shows me not being able to drag the button into viewcontroller.swift using my 3rd View Controller.
有人可以帮我吗?我不知道如何修复它.
May someone please help me? I don't know how to fix it.
推荐答案
对于故事板中的每个视图控制器,您都需要将其与一个视图控制器类相关联.和一个视图控制器的组件,只能拖动其关联的视图控制器类.据我了解,您正试图将一个视图控制器的组件拖动到不相关的类.
For every view controller in storyboard you need to associate it with a view controller class. and component of one view controller in drag-able only its associated view controller class. what I understand you are trying to drag component of one view controller to not associated class.
在激活助手编码页面时选择自动选项.
Select Automatic option on when active assistant coding page.
这篇关于我的第一个 xcode 视图控制器与其他视图控制器不同.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!