Spring数据以MealplanCalls.getRestaurants(userId: userId) { (restaurantList, error) in
if let error = error {
self.showError(show: "Error", display: error)
} else {
var currentPlansArray = [Mealplan]()
var restaurantIndex = 0
let group = DispatchGroup()
while (restaurantIndex < restaurantList.count) {
group.enter()
MealplanCalls.getPlans(restaurantId: restaurantList[restaurantIndex]) { (mealplans, error) in
guard let mealplans = mealplans, mealplans.count > 0 else { return }
self.planArray.append(contentsOf: mealplans)
print("empty : \(self.planArray.count), \(self.planArray)")
if let error = error {
self.showError(show: "Error", display: error)
}
group.leave()
currentPlansArray.removeAll()
restaurantIndex += 1
}
}
group.notify(queue: DispatchQueue.main, execute: {
self.planTable.reloadData()
})
}
} + painter.fillRect(event->rect(), QColor(0, 0, 0));
painter.drawImage(QRectF(event->rect().x(), event->rect().y() + 30, 512, 512), getGameBoardImage());
//...rendering other model components
painter.setBrush(QBrush(QColor(255, 255, 255)));
//painter.setFont(getGameFont());
painter.setFont(QFont("Times New Roman", 16, QFont::Bold));
painter.drawText(0, 0, "HI-SCORE");的形式提供了便利,因此查询可能类似于: