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 | |
@IBDesignable | |
class CustomTextField: UITextField { | |
var padding: UIEdgeInsets { | |
get { | |
return UIEdgeInsets(top: 0, left: paddingValue, bottom: 0, right: paddingValue) | |
} | |
} |
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 Article {} | |
struct Picture {} | |
typealias ArticleLoaderResult = Swift.Result<[Article], Error> | |
protocol ArticleLoader { | |
func load(date: Date, completion: @escaping (ArticleLoaderResult) -> Void) | |
} | |
typealias PictureLoaderResult = Swift.Result<[Picture], Error> | |
protocol PictureLoader { |
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 Foundation | |
// MARK: - TeamPlayersResponse | |
struct TeamPlayersResponse: Codable { | |
let copyright: String | |
let roster: [Roster] | |
let link: String | |
} | |
// MARK: - Roster |
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 | |
// Global variable | |
public var baseUrl = URL(string: "www.myApi.com")! | |
// Protocols | |
protocol Fetchable: Decodable { | |
static var apiBase: String { get } | |
} | |
protocol Transport { |
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 SwiftUI | |
struct MainView: View { | |
@State var isPresent = true | |
@State var showFullScreen = false | |
@State var showModal = false |