Pratyush Pratik

Nov 29, 2018 13:16
hello anyone worked with sinch?
Sep 21, 2018 10:24
?
Sep 21, 2018 10:24
i want to use this in my viewController
Sep 21, 2018 10:23
extension Object{//Retrive model objects from realm database
@discardableResult
func retriveModel<T: Object>(type: T.Type) -> [T] {
do {
let realm = try Realm()
return realm.objects(T.self).toArray(ofType: T.self)
} catch let error as NSError {
fatalError(error.localizedDescription)
}
}}