StackOverflow Questions for Tag: swift-structs

gloo
gloo

Reputation: 2580

Does a mutating struct function create a new copy of self?

Score: 14

Views: 5394

Answers: 4

Read More
Jaiz
Jaiz

Reputation: 23

Trouble assigning text recognized by Swift's Vision library to the instance attribute of a struct for display

Score: 2

Views: 790

Answers: 1

Read More
Abrar
Abrar

Reputation: 7222

Why can a constant property in a struct be mutated in the initializer?

Score: -1

Views: 39

Answers: 1

Read More
Fattie
Fattie

Reputation: 12582

Swift 5.7, can you use a string to dynamically use a keyPath with Structs?

Score: 1

Views: 993

Answers: 2

Read More
Andrew
Andrew

Reputation: 37

How can I make a "Dummy" struct in swift so it returns one struct or another based on a variable

Score: -1

Views: 113

Answers: 1

Read More
Cory Bunge
Cory Bunge

Reputation: 1

Mutate Model Struct in a ForEach - Swift/SwiftUI

Score: 0

Views: 31

Answers: 0

Read More
tarun_sharma
tarun_sharma

Reputation: 871

Swift 2.2 MVVM view Model as mutable struct doesn't maintain state in view controller

Score: 10

Views: 765

Answers: 0

Read More
S Surya
S Surya

Reputation: 147

How to convert swift-struct object name using swift-string

Score: 0

Views: 855

Answers: 2

Read More
Maxim Zenkov
Maxim Zenkov

Reputation: 51

Why doesn't swift allow me to create a protocol type field?

Score: 3

Views: 83

Answers: 1

Read More
GlitterGrrl
GlitterGrrl

Reputation: 19

Having trouble with "Return from initializer without initializing all stored properties" error

Score: 0

Views: 938

Answers: 1

Read More
Drake Jordan
Drake Jordan

Reputation: 13

How to create a JSON that conforms to this Swift Struct

Score: 1

Views: 57

Answers: 2

Read More
John Harrington
John Harrington

Reputation: 1697

Do something as soon as UIViewRepresentable is instantiated

Score: 2

Views: 1534

Answers: 1

Read More
juliannehong
juliannehong

Reputation: 111

Swift 4.2) Mutate array of struct with for_in/forEach vs. access by index

Score: 11

Views: 7219

Answers: 2

Read More
RobotX
RobotX

Reputation: 246

How to add network fetch inside swift struct initializer

Score: 0

Views: 139

Answers: 1

Read More
Sam
Sam

Reputation: 1230

Add ID Property on Struct Fetched From JSON

Score: 1

Views: 1469

Answers: 1

Read More
nahsiloh
nahsiloh

Reputation: 21

Access swift structure attribute using a variable

Score: 0

Views: 185

Answers: 1

Read More
Danny
Danny

Reputation: 139

How to update the values of a struct in a View

Score: 3

Views: 7215

Answers: 2

Read More
Hiro
Hiro

Reputation: 165

【SwiftUI】How to initialize an empty struct

Score: -1

Views: 2205

Answers: 1

Read More
poPaTheGuru
poPaTheGuru

Reputation: 1080

Use Struct as a parameter in a function in Swift

Score: 1

Views: 854

Answers: 1

Read More
erikvm
erikvm

Reputation: 928

Update and append decoded JSON into struct?

Score: 0

Views: 568

Answers: 1

Read More
PreviousPage 1Next