回答編集履歴

1

修正、追加

2016/11/06 20:01

投稿

fromageblanc
fromageblanc

スコア2724

test CHANGED
@@ -1,7 +1,21 @@
1
- これでどうでしょうか
1
+ これでどうでしょうか(修正)
2
2
 
3
3
  ```swift
4
4
 
5
- let csvBundle = Bunde.mainBundele().pathForResource("start", ofType: "csv")
5
+ let csvBundle = Bundle.main.path(forResource: "start", ofType: "csv")
6
6
 
7
7
  ```
8
+
9
+ 追加
10
+
11
+ ```swift
12
+
13
+ let csvData = try? NSString(contentsOfFile: csvBundle!, encoding: String.Encoding.utf8.rawValue)
14
+
15
+
16
+
17
+ //public convenience init(contentsOfFile path: String, encoding enc: UInt) throws
18
+
19
+ //エラーハンドリングなし
20
+
21
+ ```