teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

エラー内容を追記しました!よろしくお願いいたします。

2015/12/17 14:17

投稿

ShoheiOkamoto
ShoheiOkamoto

スコア11

title CHANGED
File without changes
body CHANGED
@@ -41,10 +41,11 @@
41
41
 
42
42
  //ここより下からエラーが出ます
43
43
  let cell = tableView.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath)
44
+ //エラー内容→ Constant'cell' inferred to have type 'AnyObject',which may be unexpected
44
45
 
45
- cell.textLabel!.text = "\(myItems[indexPath.row])"
46
+ cell.textLabel!.text = "\(myItems[indexPath.row])"//エラー内容→ 'UILabel?' does not have a member named 'text'
46
47
 
47
- return cell
48
+ return cell//エラー内容→ Type'AnyObject' cannot be implicity downcast to 'UITableViewCell';did you mean to use 'as' to force downcast?
48
49
  }
49
50
 
50
51