Home IOS Development ios – SwiftUI can’t assign dictionary.elements to a variable

ios – SwiftUI can’t assign dictionary.elements to a variable

0
ios – SwiftUI can’t assign dictionary.elements to a variable

[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:

  1. Can’t assign to property: ‘self’ is immutable
  2. 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]

LEAVE A REPLY

Please enter your comment!
Please enter your name here