How to have a List <String> property?

How do I get the List property in a Realm object? I want to save strings for the same object so that they are not related to each other, each of which has one string (which I assume if I use some StringWrapper class).

+4
source share
1 answer

You cannot use List for this.

List for many relationships

However, you can achieve what you want by combining all your lines into one, separated by a character. You use it

func componentsSeparatedByString (_ separator: String) → [AnyObject]

to return your array.

0
source

All Articles