回答編集履歴

3

修正

2015/12/17 14:57

投稿

_Kentarou
_Kentarou

スコア8490

test CHANGED
@@ -4,16 +4,24 @@
4
4
 
5
5
 
6
6
 
7
- Xcode7.2です。
7
+ こちらの環境はXcode7.2 Swift2.1.1 です。
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
- swiftのバージョンが2.0で無ければキャストが必要かもしれません。
13
+ swiftのバージョンが古い場合キャストが必要かもしれません。
14
14
 
15
15
  ```swift
16
16
 
17
17
  var cell = tableView.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath) as UITableViewCell
18
18
 
19
+
20
+
21
+ or
22
+
23
+
24
+
25
+ var cell = tableView.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath) as! UITableViewCell
26
+
19
27
  ```

2

修正

2015/12/17 14:57

投稿

_Kentarou
_Kentarou

スコア8490

test CHANGED
@@ -5,3 +5,15 @@
5
5
 
6
6
 
7
7
  Xcode7.2です。
8
+
9
+
10
+
11
+
12
+
13
+ swiftのバージョンが2.0で無ければキャストが必要かもしれません。
14
+
15
+ ```swift
16
+
17
+ var cell = tableView.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath) as UITableViewCell
18
+
19
+ ```

1

修正

2015/12/17 14:48

投稿

_Kentarou
_Kentarou

スコア8490

test CHANGED
@@ -1,5 +1,7 @@
1
- 新規のプロジェクトにソースを貼り付けてエラー無く表示できました。
1
+ 新規のプロジェクトのViewControllerにソースを貼り付けてエラー無くテーブルが表示できました。
2
+
3
+ ※Storyboardの変更無し
2
4
 
3
5
 
4
6
 
5
- 試してみてください、このコード以外の問題かと思います。
7
+ Xcode7.2です。