mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2025-01-03 13:31:09 +07:00
Update README.md
This commit is contained in:
parent
c21a8efa5f
commit
225e7a2862
@ -166,7 +166,7 @@ Dependency injection is a pattern that can be used to eliminate the need for sin
|
|||||||
|
|
||||||
### Type of Dependency Injection
|
### Type of Dependency Injection
|
||||||
|
|
||||||
1. initializer injection
|
**1. initializer injection**
|
||||||
|
|
||||||
``` swift
|
``` swift
|
||||||
class DataManager {
|
class DataManager {
|
||||||
@ -180,7 +180,7 @@ Dependency injection is a pattern that can be used to eliminate the need for sin
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2. property injection
|
**2. property injection**
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
import UIKit
|
import UIKit
|
||||||
@ -192,7 +192,7 @@ class ViewController: UIViewController {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
3. method injection
|
**3. method injection**
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
import Foundation
|
import Foundation
|
||||||
|
Loading…
Reference in New Issue
Block a user