プログラミングスクール最大70%OFF! ←クリックして見に行く

【Error】Cannot find type ‘UITableViewCell’ in scope

【Error】Cannot find type ‘UITableViewCell’ in scope

エラー解消方法の備忘録_φ(・_・ )

発生したエラー

Cannot find type ‘UITableViewCell’ in scope

Point

UITableViewCellに限らず、
UI●●のクラスを作成した時に表示されます。

翻訳

スコープに ‘UITableViewCell’ という型が見つかりません。

原因

UITableViewCellを使うにはUIKitをインポートする必要がある為

解決手順

・UIKitをインポートすることでエラー解消します!
import UIKit

Point

ちなみに「UIKit」に「Foundation」が含まれているので、
「import Foundation」は削除して問題ありません。

参考サイト

https://qiita.com/tosh_3/items/f539c7503cb220f125c8
https://qiita.com/yyokii/items/4c08e0c71fb6e881c47e

Swiftカテゴリの最新記事