Add Boolean in CoreData

There's my idea. I have made an UISwitch already, then I want to save it if the user turns it on or off. Is there any way can I save it in the CoreData?

Replies

What did you try ? What doesn't work ?

You should create a Boolean attribute and save theWitch.isOn value inside.

If you need some tutorial, read this:

h t t p s : / / betterprogramming.pub/core-data-basics-swift-persistent-storage-ba3185fe7061