我有一個tableView
音樂專輯。對於tableView
的每個cell
我想要顯示音樂專輯封面藝術以及相應專輯的音樂曲目列表。UITableView裏面的UITableViewCell
所以基本上,在每個音樂專輯UITableViewCell
上面會有音樂專輯封面,下面是UITableView
。
UITableViewCell
例如:
我儘量添加音樂專輯封面的上半部分,並在下半部空白UITableView
。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
AlbumsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
MPMediaItem *rowItem = [[albumsArrayForTVC objectAtIndex:indexPath.row] representativeItem];
MPMediaItemArtwork *artwork = [rowItem valueForProperty:MPMediaItemPropertyArtwork];
inputImage = [artwork imageWithSize: CGSizeMake (1024, 1024)];
if (inputImage) {
cell.backgroundImageView.image = inputImage;
} else {
cell.backgroundImageView.image = nil;
}
UITableViewCell *songCell = [cell.songTableView dequeueReusableCellWithIdentifier:@"OtherCell"];
songCell.textLabel.text = @"This text doesn't show up yet";
return cell;
}
我無法弄清楚裏面cellForIndexPath
如何在歌曲UITableView
填寫。我只是試圖使用靜態的textLabel.text
,即使我最終會通過歌曲的實際NSArray
來填充它。
我知道這是一個令人困惑的事情,在風格上它在大多數情況下是沒有意義的,但是有沒有人知道如何做到這一點?
酷我會試試這個! – SRMR