mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2024-12-22 22:45:33 +07:00
edit userdefault
This commit is contained in:
parent
9b66231a21
commit
6e35b5153a
11
README.md
11
README.md
@ -428,9 +428,15 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau
|
||||
}
|
||||
```
|
||||
|
||||
<img src = "https://github.com/jphong1111/Useful_Swift/blob/main/Images/DocumentPath.png" />
|
||||
|
||||
simply move into that path and you can find the documentDirectory of your Application
|
||||
> if Library is not shown up, just do **Shift + Command + .** to show hidden files in your folder
|
||||
|
||||
### Usage
|
||||
f
|
||||
<img src = "https://github.com/jphong1111/Useful_Swift/blob/main/Images/UserDefaultPlistPath.png" />
|
||||
|
||||
As you can see in the below, intArray will stored inside the device through UserDefaults(), so that if device is shut down, changed value wil be stored in device.
|
||||
|
||||
```swift
|
||||
@ -451,6 +457,11 @@ class ViewController: UIViewController {
|
||||
}
|
||||
}
|
||||
```
|
||||
You can your plist file like this!
|
||||
|
||||
<img src = "https://github.com/jphong1111/Useful_Swift/blob/main/Images/UserDefaultPlist.png" />
|
||||
|
||||
**You are GOOD TO GO** 👏👏👏
|
||||
|
||||
## Core Data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user