This file contains hidden or 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
extension KeyedDecodingContainer { | |
typealias AnyDictionaryType = Dictionary<String, Any>.Type | |
typealias AnyArrayType = Array<Any>.Type | |
typealias AnyArrayOfDictionariesType = Array<Dictionary<String, Any>>.Type | |
// Decode Dictionary<String, Any> | |
func decode(_ type: AnyDictionaryType, forKey key: KeyedDecodingContainer<K>.Key) throws -> Dictionary<String, Any> { | |
let container = try self.nestedContainer(keyedBy: AnyCodingKeys.self, forKey: key) | |
return try container.decode(type) |
This file contains hidden or 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 AppComponentConfig: ComponentConfig, Decodable { | |
var identifier: String = "" | |
var componentName: String = "" | |
var launchOnInit: Bool = false | |
var acceptPush: Bool = false | |
var urlScheme: String = "" | |
private enum CodingKeys: String, CodingKey { |
This file contains hidden or 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
@IBAction func signupButtonClicked(_ sender: UIButton) { | |
do { | |
try decideToSendSignupData() | |
SVProgressHUD.setDefaultMaskType(.gradient) | |
SVProgressHUD.show(withStatus: LoadingMessages.simple.localized ) | |
self.serviceCore.sendSignUpRequet(email: self.emailTextField.text!, password: self.passTextField.text!) | |
} |
This file contains hidden or 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
extension UIColor { | |
struct MyDefaultsColor { | |
private init(){} | |
static let Red = UIColor(red: 1.0, green: 0.1491, blue: 0.0, alpha: 1.0) | |
static let Green = UIColor(red: 0.0, green: 0.5628, blue: 0.3188, alpha: 1.0) | |
static let Blue = UIColor(red: 0.0, green: 0.3285, blue: 0.5749, alpha: 1.0) | |
} | |