![ios – SwiftUI can’t assign dictionary.elements to a variable ios – SwiftUI can’t assign dictionary.elements to a variable](https://geeks-news.com/wp-content/uploads/https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded)
[ad_1]
Because the title says, I can’t assign a personal variable to dictionary[item].elements(). I’m not attempting to vary the worth of it, merely attempting to repeat the worth to make use of it some other place. Though, later I could must know find out how to change it.
The principle errors I encounter are:
- Can’t assign to property: ‘self’ is immutable
- Sort ‘()’ can’t conform to ‘View’
My code presently:
@Binding var dictionary: [String:Any]
personal var passage = ""
let merchandise: String
var physique: some View
")[0]
let passageArray = passage.elements(sepratedBy: " ")
// there's a bunch extra code after this(has nothing to do with situation although)
[ad_2]