Skip to content

Instantly share code, notes, and snippets.

@D-32
Created June 6, 2016 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save D-32/b765a8d8a6a952221236bc419844b0e4 to your computer and use it in GitHub Desktop.
Save D-32/b765a8d8a6a952221236bc419844b0e4 to your computer and use it in GitHub Desktop.
Storing non "Object" classes in a Realm List
var textReco: [CGRect] {
get {
return _backingTextReco.map { CGRectFromString($0.stringValue) }
}
set {
_backingTextReco.removeAll()
_backingTextReco.appendContentsOf(newValue.map({ RealmString(value: [NSStringFromCGRect($0)]) }))
}
}
let _backingTextReco = List<RealmString>()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment