我的第一个xcode视图控制器不像其他人。为什么? [英] My first xcode view controller does not act like the others. Why?
问题描述
在这里,我有这张图片: http://pasteboard.co/1BkM01ZM.png p>
它显示我可以将按钮拖动到viewcontroller.swift使用根视图控制器。
下一个视图图片: http://pasteboard.co/1BkRhECX.png
这张图片显示我无法使用第3个视图控制器将按钮拖动到viewcontroller.swift。
有人可以帮助我吗?
对于storyboard中的每个视图控制器,您需要将其与视图控制器类。和一个视图控制器的组件只能在其可关联的视图控制器类中。我理解你正试图将一个视图控制器的组件拖到不关联的类。
当活动的助理编码页面选择自动选项。
Right Here I Have This Picture: http://pasteboard.co/1BkM01ZM.png
It shows me being able to drag the button into viewcontroller.swift Using the root View Controller.
Next View This Picture: http://pasteboard.co/1BkRhECX.png
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屋!