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
/** | |
add the content of a dictionary into another dictionary | |
swift 3 | |
*/ | |
func += <K>( dict1:inout [K:Any], dict2:[K:Any]){ | |
dict2.forEach { (key: K, value: Any) in | |
dict1[key] = value | |
} | |
} |
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
infix operator <~> : AssignmentPrecedence | |
//Bidirectional bind RxSwift, swift 3 | |
public func <~> <E,C: ControlPropertyType>(property: C, variable: Variable<E>) -> Disposable where C.E == E? { | |
let bindToUIDisposable = variable.asObservable() | |
.bindTo(property) | |
let bindToVariable = property | |
.subscribe(onNext: { n in | |
if let n = n{ | |
variable.value = n |
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
// | |
// ObjectMapperRealmHelper.swift | |
// Pods | |
// | |
// Created by Santiago Bustamante on 10/13/16. | |
// | |
// | |
import ObjectMapper | |
import RealmSwift |
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
// | |
// ObjectMapperRealmHelper.swift | |
// | |
// Created by Santiago Bustamante on 07/27/18. | |
// | |
// | |
import ObjectMapper | |
import RealmSwift |
OlderNewer