方法: 可以通過 segue來傳值, 可分為六步, 如下:
步驟如下:
第一步: 給containerView的segue ?identifier 賦值

第二步: 在調(diào)用containerView的主界面controller中, 設(shè)置container的屬性

第三步: 通過segue 的ID ?獲取container目標(biāo), 將第二部的全局屬性這里進(jìn)行賦值

第四步: 在主viewController獲取網(wǎng)絡(luò)數(shù)據(jù)時, 將網(wǎng)絡(luò)數(shù)據(jù)賦值給containerView 的對應(yīng)數(shù)據(jù)屬性
注: 在這之前, 需要在containerView類下創(chuàng)建對應(yīng)的接收數(shù)據(jù)屬性;

第五步: 通過第四步, 從主ViewController上獲取數(shù)據(jù)

第六步: 獲取網(wǎng)絡(luò)數(shù)據(jù)的同時, 刷新containerView界面
