I have a Realm database, in which I store my entries. Storing & querying work without any problems. I know in Swift Realm Results are lazy but I can't get why this is happening.
newsItems = databaseHelper.retriveAllNews()
//[...] this is on tableView method
let currentNew = newsItems[indexPath.row]
newsCell.newsTitle.text = currentNew.title
newsCell.newsText.text = currentNew.info
The most likely cause of the problem you're seeing is omitting the
dynamic modifier from the property declarations in your model class. The
dynamic modifier is necessary to ensure that Realm has an opportunity to intercept access to the properties, giving Realm an opportunity to read / write the data from the file on disk. Omitting these properties results in the Swift compiler accessing the instance variables directly, cutting Realm out of the loop.