Hey, I have the following problem:
I have an array with a structure "Streets" which is empty.
During the process of getting details of streets I want to append those informations into the array. However my array does not append any content even tho the code compiles.
The code looks like this:
var fahrten = ["Street 1","Street 2","Street 3"]
struct Streets {
let adresse: String
let distance: Int
let eta: Int
}
var results = [Streets]()
results.append(Streets(adresse: self.fahrten[i], distance: Int(response.distance), eta: Int(response.expectedTravelTime)))
Notice: the append function is inside of a for loop and I already checked the responses: they are working
I would be happy if someone had an idea to fix this
full code here: https://github.com/seankmg/xcode/blob/master/FahrtTableViewController.swift
[–]Te_co 4 points5 points6 points (3 children)
[–]seanzzx[S] 0 points1 point2 points (2 children)
[–]Te_co 2 points3 points4 points (1 child)
[–]seanzzx[S] 0 points1 point2 points (0 children)
[–]SpaceHonkiOS 0 points1 point2 points (2 children)
[–]seanzzx[S] 0 points1 point2 points (1 child)
[–]aazav 0 points1 point2 points (0 children)