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