回答編集履歴
1
修正
answer
CHANGED
@@ -1,4 +1,22 @@
|
|
1
|
-
Bundle
|
1
|
+
## Bundleから読み込む場合
|
2
2
|
|
3
3
|

|
4
|
-

|
4
|
+

|
5
|
+
|
6
|
+
## Document Folderから読み込む場合
|
7
|
+
|
8
|
+
```swift
|
9
|
+
import UIKit
|
10
|
+
|
11
|
+
class ViewController: UIViewController {
|
12
|
+
|
13
|
+
override func viewDidLoad() {
|
14
|
+
super.viewDidLoad()
|
15
|
+
|
16
|
+
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first! as NSString
|
17
|
+
let path = paths.stringByAppendingPathComponent("Dictionary.plist")
|
18
|
+
let dictionary = NSDictionary(contentsOfFile: path)
|
19
|
+
print(dictionary)
|
20
|
+
}
|
21
|
+
}
|
22
|
+
```
|