python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to add network fetch inside swift struct initializer
I'm trying to get data from an URL (1st network call), then make a 2nd network call to fetch image from the url in the first response, and present on tableview in swift.
The json from 1st network call...
RobotX
Votes: 0
Answers: 1
How to convert swift-struct object name using swift-string
I have a struct name called Car. Car has two attributes(noOfTyres, ownerName).
struct Car {
var noOfTyres: Int
var ownerName: String
}
The string value is let objStr = "Car/ownerName&quo...
S Surya
Votes: 0
Answers: 2
Add ID Property on Struct Fetched From JSON
I have a 'Recipe' struct whose instances are created by parsing a JSON file. All the properties of Recipe map to the JSON, except for one: id.
I want each struct instance to be uniquely identifiable v...
Sam
Votes: 0
Answers: 1
Access swift structure attribute using a variable
I am new to swift and I am trying to find out, how to access the structure attribute through a variable. Being a JS developer, we are able to access the object key through a variable, so I am trying t...
nahsiloh
Votes: 0
Answers: 1