0
嗨我想通過以下方法創建一個動態tableView。但是在模擬器執行期間出現錯誤。它與預先聲明的NSArray一起工作,但以下方法不起作用。你能幫我解決這個問題嗎?添加項到一個tableView?!
NSMutableArray *mesProduits;
mesProduits = [[NSMutableArray alloc] init];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellule];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:cellule];
}
for(int index = 0; index < [myObjectsFormulas count]; index = index+13)
{
monTest = [myObjectsFormulas objectAtIndex:monIndex];
monIndex = monIndex+13;
[mesProduits addObject:monTest];
}
NSString *celltext1 = [mesProduits objectAtIndex:indexPath.row];
cell.textLabel.text = celltext1;