Skip to content

Instantly share code, notes, and snippets.

View mlego's full-sized avatar
🤘
Coding

Martin Legowiecki mlego

🤘
Coding
  • VSCO
  • Los Angeles, CA
View GitHub Profile
@mlego
mlego / ViewLocale.swift
Last active January 21, 2022 03:58
ViewLocale - SwiftUI custom modifier, with autocompleting locale identifiers, to easily and quickly preview localized views
// A simple custom modifier, with autocompleting locale identifiers, to easily preview localized views
struct ViewLocale: ViewModifier {
enum Identifier: String {
case english = "en"
case french = "fr"
case polish = "pl"
}
let localeIdentifier: Identifier
@mlego
mlego / factory.swift
Created April 3, 2019 19:18
Example Factory
import Foundation
import MyFramework
final class DataUseCaseComposer: DataUseCaseOutput {
let outputs: [DataUseCaseOutput]
public init(_ outputs: [DataUseCaseOutput]) {
self.outputs = outputs
}