mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2024-12-22 22:15:43 +07:00
update Factory, Adaptor design pattern
need to fill those parts
This commit is contained in:
parent
2fb74ea600
commit
7114f4ae2e
32
README.md
32
README.md
@ -21,13 +21,16 @@ Feel free to fork this repository and pull requests!!
|
||||
- [Coding Convention](#Coding-convention)
|
||||
- [Swift Lint](#Swift-lint)
|
||||
- [Design Pattern](#Design-Pattern)
|
||||
- [Adaptor](#Adaptor)
|
||||
- [Delegation](#Delegation)
|
||||
- [Singleton](#Singleton)
|
||||
- [Factory](#Factory)
|
||||
- [Observer](#Observer)
|
||||
- [KVO](#KVO)
|
||||
- [KVC](#KVC)
|
||||
- [Singleton](#Singleton)
|
||||
- [Code Structuring](#code-structuringarchitecture)
|
||||
- [MVC](#MVC)
|
||||
- [MVP](#MVP)
|
||||
- [MVVM](#MVVM)
|
||||
- [VIPER](#VIPER)
|
||||
- [UIDesign](#UIDesign)
|
||||
@ -141,22 +144,15 @@ put .yml file into root folder and apply following code in Build Phases
|
||||
|
||||
Check [this](https://refactoring.guru/design-patterns/swift) website for design pattern in Swift
|
||||
|
||||
## Adaptor
|
||||
|
||||
## Delegation
|
||||
|
||||
```swift
|
||||
weak var delegate: SomeProtocol?
|
||||
```
|
||||
|
||||
## Singleton
|
||||
|
||||
|
||||
```swift
|
||||
class SingletonPattern {
|
||||
static let manager = SingletonPattern()
|
||||
|
||||
private init() {}
|
||||
}
|
||||
```
|
||||
## Factory
|
||||
|
||||
## Observer
|
||||
|
||||
@ -179,9 +175,18 @@ For more info, go [Apple Developer Site](https://developer.apple.com/documentati
|
||||
|
||||
## KVC
|
||||
|
||||
|
||||
[KVO vs KVC](https://medium.com/hackernoon/kvo-kvc-in-swift-12f77300c387)
|
||||
|
||||
## Singleton
|
||||
|
||||
```swift
|
||||
class SingletonPattern {
|
||||
static let manager = SingletonPattern()
|
||||
|
||||
private init() {}
|
||||
}
|
||||
```
|
||||
|
||||
## Code Structuring(Architecture)
|
||||
|
||||
### MVC
|
||||
@ -194,6 +199,9 @@ MVC pattern stands for Model - View - Controller
|
||||
- View - View renders the data for users
|
||||
- Controller - Controller modifies the View, accepts user input and interacts directly with the Model. And take care of view logic and business logic.
|
||||
|
||||
### MVP
|
||||
|
||||
|
||||
### MVVM
|
||||
|
||||
MVVM patterns stand for Model - View - ViewModel
|
||||
|
Loading…
Reference in New Issue
Block a user