This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plugin type alias | |
typealias Plugin<T> = (T) -> T | |
// Plugin protocol for flexibility | |
protocol Pluginable { | |
associatedtype T | |
var plugins: [Plugin<T>] { get set } | |
func applyPlugins(to value: T) -> T | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// CleanCodeApp | |
// | |
// Created by Damodar Namala on 06/06/24. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// CleanCodeApp | |
// | |
// Created by Damodar Namala on 21/05/24. | |
// | |
import UIKit | |
import RxSwift | |
import RxCocoa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// OOTB-Design | |
// | |
// Created by Damodar Namala on 03/04/24. | |
// | |
import UIKit | |
import Resolver | |
import SnapKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Post: Codable { | |
let id: Int | |
let title: String | |
let body: String | |
} | |
protocol PostServiceProtocol { | |
func fetchPosts(page: Int) -> AnyPublisher<[Post], Error> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import CryptoKit | |
import Security | |
import SwiftECC | |
import ASN1 | |
import BigInt | |
class ViewController: UIViewController { | |
override func viewDidLoad() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// FormConfig | |
// | |
// Created by Damodar Namala on 01/08/23. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContainerViewController: UIViewController { | |
private lazy var contentStackView: UIStackView = { | |
let view = UIStackView() | |
view.axis = .vertical | |
view.spacing = 16.0 | |
return view | |
}() | |
override func loadView() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// ReusableTableView | |
// | |
// Created by Damodar Namala on 23/04/23. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol DollarRateUseCase { | |
func fetchDollarRate() -> AnyPublisher<Int, Never> | |
} | |
struct DollarRateUseCaseTask: DollarRateUseCase { | |
func fetchDollarRate() -> AnyPublisher<Int, Never> { | |
return Future { promise in | |
DispatchQueue.main.asyncAfter(deadline: .now() + 5) { |
NewerOlder