1. main view
2. table view
目的:
將main view的資料傳送到table view上並顯示出來
重點:
從main view建立table view的instance 來傳資料給table view, ex:
DetailData *_showDetailData = [[DetailData alloc] init];
_showDetailData.receiveArrayBatLevel = arrayBatLevel;
_showDetailData.receiveArrayCurTime = arrayCurTime;
DetailData為table view, create instance of DetailData, 將arrayBatLevel (main view的資料)傳給table view
若用相反方式來作, 則須透過protocol,
沒有留言:
張貼留言