在 Xcode 7 中將出口從文件連接到情節提要 (Connect outlet from file to storyboard in Xcode 7)


問題描述

在 Xcode 7 中將出口從文件連接到情節提要 (Connect outlet from file to storyboard in Xcode 7)

我遇到了一個小問題,可能與 Xcode 7 有關。在我的故事板中,我有帶有自定義類子視圖的視圖控制器。這個子視圖包含 UILabel。在以前版本的 Xcode 中,我能夠創建類,比如說從 UIView 繼承的 CustomClass,手動輸入 IBOutlet 屬性並將其從類文件連接到情節提要中的標籤。現在這似乎是不可能的,我無法從 IBOutlet 行中顯示的那個小圓圈中拖動連接。

你們中有人有同樣的問題嗎?


參考解法

方法 1:

Ok, solved. I'm able to connect outlet from connection inspector in Utilities panel.

(by MichalMoskalaMichalMoskala)

參考文件

  1. Connect outlet from file to storyboard in Xcode 7 (CC BY‑SA 2.5/3.0/4.0)

#iboutlet #storyboard #iOS #XCode






相關問題

iOS - IB 視圖模式 (iOS - IB view mode)

NSWindow 的 IBOutlet 組件什麼時候初始化? (When IBOutlet components of NSWindow are initialized?)

收到內存警告和內存洩漏 (Receive memory warning and memory leak)

如何在 init 方法中從 NIB 加載 IBOutlets? (How to load the IBOutlets from NIB in the the init method?)

將 xib 從一個項目複製到另一個項目 (copy the xib from one project to another project)

將案例編碼到 appDelegate 文件中 (The case(s) coding into appDelegate file)

nib 中的 UIView 在 iPad 上是 nil,在 iPhone 上不是 nil (UIView in nib is nil on iPad, and not nil on iPhone)

awakeFromNib 無法從 UILabel 獲取值,也無法禁用 UIButton (awakeFromNib can't get value from UILabel and can't disable UIButton)

“找不到名為 ViewController 的類的任何信息” ("Could not find any information for class named ViewController")

在 Xcode 7 中將出口從文件連接到情節提要 (Connect outlet from file to storyboard in Xcode 7)

為什麼“文件所有者”有時會有“視圖”出口?我可以添加我自己的嗎? (Why does "File's Owner" sometimes have a "view" outlet? Can I add my own?)

Interface Builder 中的 IBOutletCollection 集排序 (IBOutletCollection set ordering in Interface Builder)







留言討論