swift loop through array inside view code example
Example 1: loop through array swift
let names = ["a", "b", "c"]
for name in names {
print(name)
}
Example 2: swift loop through array of objet
let userPhotos = currentUser?.photos
for var i = 0; i < userPhotos!.count ; ++i {
let url = userPhotos![i].url
}