質問編集履歴
1
コンパイラエラーが出るところまでのコードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,51 @@
|
|
1
|
+
import UIKit
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
class ListViewController: UITableViewController, XMLParserDelegate {
|
6
|
+
|
7
|
+
var paraser:XMLParser!
|
8
|
+
|
9
|
+
var items = [Item]()
|
10
|
+
|
11
|
+
var item:Item?
|
12
|
+
|
13
|
+
var currentString = ""
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
override func tableView(_ tabale: UITableView,numberOfRowsInSection section: Int) -> Int {return items.count
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
override func tableView(_ tableView:UITableView,cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
26
|
+
|
27
|
+
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell",for: indexPath)
|
28
|
+
|
29
|
+
cell .textLabel?.text = items[indexPath.row].title
|
30
|
+
|
31
|
+
return cell
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
override func viewDidAppear(_ animated: Bool) {
|
40
|
+
|
41
|
+
super.viewDidAppear(animated)
|
42
|
+
|
43
|
+
startDownload()
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
|
1
49
|
func startDownload() {
|
2
50
|
|
3
51
|
self.items = []
|