HomeiOS Developmentios - SwiftUI can't assign dictionary.parts to a variable

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


Because the title says, I can’t assign a non-public variable to dictionary[item].parts(). I’m not making an attempt to vary the worth of it, merely making an attempt to repeat the worth to make use of it some other place. Though, later I’ll have to know tips on how to change it.

The principle errors I encounter are:

  1. Can’t assign to property: ‘self’ is immutable
  2. Kind ‘()’ can’t conform to ‘View’

My code at present:

@Binding var dictionary: [String:Any]
non-public var passage = ""
let merchandise: String

var physique: some View
")[0]

   let passageArray = passage.parts(sepratedBy: " ")
   // there's a bunch extra code after this(has nothing to do with situation although)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments