Home>

Swift&ios11
I am frustrated with the book
UI parts customization-properties and methods-

import UIKit
var str = "Hello, playground"
var slider = "UISlider ()"
slider.value = 1.0

Error
Value of type 'String' has no member 'value'

error: MyPlayground.playground: 7: 8: error: value of type 'String' has no member 'value'
slider.value = 0.8
~~ ^ ~~~~

Please tell me why the code is the same as the code in the book but why I get an error!