Something to know before we get started – the following is just a quick notes of some of my findings about overriding getter & setter in the property and using private properties in the models. It will be relatively short & not in-depth, but comments are welcome if you want to discuss more on these.
So, let’s get started. In the past few weeks I’m working on an iOS app with RealmSwift as the choice of the local database. This is my 1st time working with Realm APIs and I’ve encountered some issues and concerns. As mentioned before we started, one of the issue was about overriding getter & setter of the property in a Realm model class, and the concern was about “can private properties be used in the models?”
First off, we start from having a look of Setters and getters section from Realm’s document.