PlaygroundValue
The types you can save in the key-value store or send in messages to live views.
Declaration
enum PlaygroundValueOverview
The example below stores a dictionary in a PlaygroundValue instance and then stores the value in a PlaygroundKeyValueStore.
let myData = [
"animal": PlaygroundValue.string("Llama"),
"count": PlaygroundValue.integer(5)
]
PlaygroundKeyValueStore.current.keyValueStore["AnimalCountDict"] = .dictionary(myData)For information about using PlaygroundValue instances to send messages, see Send and Receive Messages.
Topics
Representing Data
PlaygroundValue.boolean(_:)PlaygroundValue.data(_:)PlaygroundValue.date(_:)PlaygroundValue.floatingPoint(_:)PlaygroundValue.integer(_:)PlaygroundValue.string(_:)