0

Normally when you NSLog a Realm object you get something like:

MPWidget {
    identifier: 5,
    title: "My widget",
    cost: 38
}

However, if a Realm object has a description property I just see the description printed instead. Just the description, no other properties or inkling that it's a Realm object.

Is this a feature or a bug? Is it documented anywhere? And lastly, can I turn it off?

1 Answer 1

2

By creating a description property, you're overriding the -description method on NSObject that's used to print an object's contents when using NSLog or println.

See https://stackoverflow.com/a/4718806/373262 for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.