Thanks to vadian's comment, I found what I expected, and it's pretty easy. I use DispatchGroup(), group.enter(), group.leave() and group.notify(queue: .main){}.
func myFunction() {
let array = [Object]()
let group = DispatchGroup()
array.forEach { obj in
group.enter()
LogoRequest.init().downloadImage(url: obj.url) { (data) in
if (data) {
group.leave()
}
}
}
group.notify(queue: .main) {
}
}