2016-10-11 3 views
-5

使用「CostumTableViewCell」

enter image description here

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 
    let cellIdentifier = "Cell" 
    let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as CostumTableViewCell 
+0

xibを使用していると思いますか?もしそうであれば、Uは最初にxibをロードしなければなりません。 –

+0

はきれいにして一度だけ実行します。 –

+3

カスタムクラス 'CostumTableViewCell'がなければなりませんか?単に' Costum'対 'Custom' – vadian

答えて

0

はあなたが含まれているかどうかを確認してください、この問題で私を助けてください:

1- import CostumTableViewCell

また、疑問符を追加する必要がありますか? as後に。

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 
    let cellIdentifier = "Cell" 
    let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as? CostumTableViewCell 

お試しください。 CostumTableViewCellの後に?