🎯
Focusing
A passionate iOS developer who turned his passion into profession. Die hard gamer whose console got dead ;P
gist: https://gist.github.com/daniyalyousuf07
-
Citi
- Toronto
- https://pk.linkedin.com/in/danioneinifiniteloop
Pinned Loading
-
A demo of Open-Closed principle.
A demo of Open-Closed principle. 1import Foundation
234protocol CakePaymentDelegate {
5func payForCake(amount: Double)
-
Facade Pattern
Facade Pattern 1import Foundation
23///Facade Class that hides implementation and provide interface to control implementation of all dependencies
4/*
5The facade pattern (also spelled façade) is a software-design pattern commonly used in object-oriented programming. Analogous to a facade in architecture, a facade is an object that serves as a front-facing interface masking more complex underlying or structural code. A facade can:
-
Factory design pattern
Factory design pattern 1import Foundation
23///In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor.
4///
5 -
A demo of Dependency Inversion Princ...
A demo of Dependency Inversion Principle (DIP) & Example of network mocking 1import Foundation
23protocol APIHandlerProtocol {
4func fetchData(url: URL,
5completion: @escaping(Result<Data,
-
This class shows the working of a se...
This class shows the working of a serial and a concurrent queue with synchronous and asynchronous tasks submitted. 1import Foundation
234///////Points to Remember
5//1 - serial - only 1 thread
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.