mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2025-02-06 01:03:36 +07:00
update load database
This commit is contained in:
parent
e5228299b2
commit
0de5ce0753
29
README.md
29
README.md
@ -39,6 +39,7 @@
|
|||||||
- [Set Up Core Data](#Set-Up-Core-Data)
|
- [Set Up Core Data](#Set-Up-Core-Data)
|
||||||
- [Usage](#Usage)
|
- [Usage](#Usage)
|
||||||
- [Store Data](#Store-Data)
|
- [Store Data](#Store-Data)
|
||||||
|
- [Load Data](#Load-Data)
|
||||||
- [Third Party Library](#Third-Party-Library)
|
- [Third Party Library](#Third-Party-Library)
|
||||||
- [GCD](#GCD)
|
- [GCD](#GCD)
|
||||||
- [DispatchQueue](#DispatchQueue)
|
- [DispatchQueue](#DispatchQueue)
|
||||||
@ -49,7 +50,7 @@
|
|||||||
- [Code Coverage](#Code-Coverage)
|
- [Code Coverage](#Code-Coverage)
|
||||||
- [Unit Test](#Unit-Test)
|
- [Unit Test](#Unit-Test)
|
||||||
- [UI Test](#UI-Test)
|
- [UI Test](#UI-Test)
|
||||||
- [IAP](#IAP)
|
- [In App Purchase(IAP)](#In-App-PurchaseIAP)
|
||||||
- [APNS](#APNS)
|
- [APNS](#APNS)
|
||||||
- [FRP](#FRP)
|
- [FRP](#FRP)
|
||||||
- [Error Search](#Error-Search)
|
- [Error Search](#Error-Search)
|
||||||
@ -679,16 +680,32 @@ print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask))
|
|||||||
|
|
||||||
> You can check Entities, Properties inside that file
|
> You can check Entities, Properties inside that file
|
||||||
|
|
||||||
|
## Load Data
|
||||||
|
|
||||||
|
Refer this code and apply it to your code wherever you want to reload it
|
||||||
|
```swift
|
||||||
|
func loadItem() {
|
||||||
|
let request: NSFetchRequest<Item> = Item.fetchRequest()
|
||||||
|
do {
|
||||||
|
itemArray = try context.fetch(request)
|
||||||
|
} catch {
|
||||||
|
print("Load Item Error: \(error.localizedDescription)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
> Item will be your Entity, itemArray will be your Entity object
|
||||||
|
> Don't forget to import **CoreData**
|
||||||
|
|
||||||
**You are GOOD TO GO** 👏👏👏
|
**You are GOOD TO GO** 👏👏👏
|
||||||
|
|
||||||
## Third Party Library
|
## Third Party Library
|
||||||
[This github](https://github.com/vsouza/awesome-ios) contains all the popular libraries in Swift:+1:
|
[This github](https://github.com/vsouza/awesome-ios) contains all the popular libraries in Swift:+1:
|
||||||
|
|
||||||
Recommand Useful Library
|
Recommand Useful Library
|
||||||
- [SDWebImage] - Download and set image Library
|
- SDWebImage - Download and set image Library
|
||||||
- [Hero] - Various kind of animation with using Segue
|
- Hero - Various kind of animation with using Segue
|
||||||
- [Alamofire] - Network Layer tool
|
- Alamofire - Network Layer tool
|
||||||
- [RxSwift] - Reactive Programming in Swift
|
- RxSwift - Reactive Programming in Swift
|
||||||
|
|
||||||
|
|
||||||
## GCD
|
## GCD
|
||||||
@ -738,7 +755,7 @@ Then, go to **EDIT SHEME**, check like this
|
|||||||
|
|
||||||
### UI Test
|
### UI Test
|
||||||
|
|
||||||
## IAP
|
## In App Purchase(IAP)
|
||||||
|
|
||||||
IAP stands for **In App Purchase**
|
IAP stands for **In App Purchase**
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user