I don't understand a completion handler and I need one in my code
问题 I capture the data from Firestore and assign to array, someone in other question told me maybe I need a completion handler but I don't understand how to work, it would be very helpful if you help me with the code and explain this concept to me. class PetsTVC: UITableViewController { var db: Firestore! let uid = Auth.auth().currentUser?.uid var petslist = [String]() var pid = "" var pets = [paw]() override func viewDidLoad() { super.viewDidLoad() self.loadPets() DispatchQueue.main.async { self