質問編集履歴

1

ソースコードをビルドできるものからコピペしました

2016/03/02 07:33

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -6,20 +6,66 @@
6
6
 
7
7
  ```Swift
8
8
 
9
- override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
9
+ import UIKit
10
10
 
11
11
 
12
12
 
13
- let cell = tableView.dequeueReusableCellWithIdentifier("UserSelect", forIndexPath: indexPath)
13
+ class TableViewController: UITableViewController {
14
14
 
15
- print(indexPath.row)
15
+ @IBOutlet var tabelView: UITableView!
16
16
 
17
+
18
+
17
-
19
+ override func viewDidLoad() {
20
+
21
+ super.viewDidLoad()
22
+
23
+ }
24
+
25
+
26
+
27
+ override func didReceiveMemoryWarning() {
28
+
29
+ super.didReceiveMemoryWarning()
30
+
31
+ }
32
+
33
+ override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
34
+
35
+ // #warning Incomplete implementation, return the number of sections
36
+
37
+ return 4
38
+
39
+ }
40
+
41
+
42
+
43
+ override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
44
+
45
+ // #warning Incomplete implementation, return the number of rows
46
+
47
+ return 1
48
+
49
+ }
50
+
51
+
52
+
53
+
54
+
55
+ override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
56
+
57
+ let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
58
+
59
+ cell.textLabel?.text = "内容";
60
+
61
+ print(indexPath)
62
+
63
+
18
64
 
19
65
  return cell
20
66
 
21
67
  }
22
68
 
23
-
69
+ }
24
70
 
25
71
  ```