Sto provando a copiare NSMutableArray
ad un altro, ma la cosa non mi mostra nulla al UITableView
:Copia NSMutableArray ad un altro
NSMutableArray *objectsToAdd= [[NSMutableArray alloc] initWithObjects:@"one",@"two"];
NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects:objectsToAdd,nil];
NSMutableArray *list = [[NSMutableArray alloc] init];
[self.list addObjectsFromArray:myArray];
Niente spettacolo in su! Che c'è?
Arresta la mia app perché non ho nulla sul mio NSMutableArray
come posso aggiungerlo a zero? addobject:nil
non funziona si blocca l'applicazione:
static NSString * DisclosureButtonCellIdentifier =
@"DisclosureButtonCellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:
DisclosureButtonCellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier: DisclosureButtonCellIdentifier]
autorelease];
}
NSUInteger row = [indexPath row];
NSString *rowString =nil;
rowString = [list objectAtIndex:row];
cell.textLabel.text = rowString;
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
[rowString release];
return cell;
perché dovrebbe essere visualizzato qualcosa? inserisci il tuo cellForRowAtIndexPath: codice del metodo – Morion
Aggiorna come posso aggiungere nil a NSMutableArray con addObject? Arresta la mia app su cellForRowAtIndexPath – stefanosn