1閉包的聲明
var chooseHouseSourceClosure: (([HouseSoueceEntity])->())? // 已選房源
閉包的實現(xiàn)
self.chooseHouseSourceClosure?(self.selectedSoueceEntityArray)
閉包的調(diào)用
houseSourceVC.chooseHouseSourceClosure = { [weak self] (houses) in
// 房源選擇結(jié)束 調(diào)用選擇房源結(jié)束的閉包
self?.selectedSoueceEntityArray.removeAll()
for house in houses {
self?.selectedSoueceEntityArray.append(house)
}