The first thing you need to do is rename your relationships and attributes. I donβt know how, but usually attribute names and relationship names cannot begin with a capital letter. Typically, the model editor in Xcode provides this.
Now to your real problem:
There are, as always, several solutions. I am trying to explain one possible solution:
Make sure Building.Title is never zero: you can do this at the level of your controller or at the model level. If you do this at the model level, just subclass NSManagedObject for this object and create a new readonly property, which you can call "titleForDisplay". Before returning a Title value, just check to see if it is nil and if it replaces it with a localized string that represents nil values.
source share