How to declare Results generic
I want to declare it like global variable in UITableViewController
and fill within viewDidLoad
func
Here's my code
class ContactsController: UITableViewController {
var contacts = Results<Contact>()
override func viewDidLoad() {
super.viewDidLoad()
contacts = Domain.FetchContacts()
}
}
But I get error
Cannot invoke initializer for type 'Results' with no arguments
How can I declare it?
I declared results generic like this
var contacts: Results<Contact>? = nil
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With