簡體   English   中英

Interface Builder文件xcode 8中的未知類CustomUITableViewCell

[英]Unknown class CustomUITableViewCell in Interface Builder file xcode 8

我嘗試在我的項目中創建一個自定義 UITableViewCell。 在另一個項目中它工作正常,但在當前,我有一個錯誤。

Interface Builder 文件中的未知類 DetailsMYFRiendsTableView

我做的第一件事是簽入 Storyboard,但我無法添加模塊!

錯誤代碼

當我嘗試選擇時,沒有可用的模塊,如果我嘗試手動添加我的項目名稱(例如:My Project),它不起作用,如果我嘗試使用:My_Project,它也不起作用。

我嘗試的另一件事是使用源代碼編輯 Storyboard 並添加以下行:

customModule="AppName" customModuleProvider="target"

但我總是有同樣的錯誤。

這是我的 ViewController 中的 my class 聲明:

class DetailsFriendsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
... Some code
}
class DetailsMYFRiendsTableView: UITableViewCell {

        @IBOutlet var city: UILabel!
        @IBOutlet var gps: UILabel!
        @IBOutlet var date: UILabel!
    }

檢查您的編譯源,是否添加了該文件(例如;ViewController.m)。

 Target --> Build Phases --> Compile Sources

檢查您的文件是否存在於此。 如果沒有,則在此處添加它,然后清理、構建並運行您的項目。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM