2017-08-01 17 views
0

我在嘗試在我的課程中實現@IBDesignable時出現上述錯誤。我嘗試過所有的在線解決方案,比如刪除派生日期更新窗口等,但沒有任何工作適合我。 我使用cocoapods version 1.2.1 這是我的課怎麼看起來未能呈現實例庫未加載[macOS]

import Cocoa 

@IBDesignable class ClassName: NSView { 

    required init?(coder: NSCoder) { 
     super.init(coder: coder) 
     commonInit(); 
    } 

    override init(frame frameRect: NSRect) { 
     super.init(frame: frameRect) 
     commonInit(); 
    } 

    func commonInit(){ 
     wantsLayer = true; 
    } 

    override func prepareForInterfaceBuilder() { 
     layer?.backgroundColor = NSColor.darkGray.cgColor 

    } 
} 

這是我podfile外觀

source 'https://github.com/CocoaPods/Specs.git' 
platform :osx, ’10.11’ 

target 'ProjectName’ do 
    use_frameworks! 
    pod 'SwiftDate', '~> 4.1.7’ 

end 

這是我收到 enter image description here錯誤的屏幕截圖

回答

0

在我的目標項目中,我去了Runpath Search Paths並編輯了@loader_path/Frameworks@loader_path/../Frameworks。這樣做解決了我的問題。