Скопируйте NSMutablearray в другой
Я пытаюсь скопироватьNSMutableArray
к другому, но это ничего не показывает мне на:UITableView
NSMutableArray *objectsToAdd= [[NSMutableArray alloc] initWithObjects:@"one",@"two"];
NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects:objectsToAdd,nil];
NSMutableArray *list = [[NSMutableArray alloc] init];
[self.list addObjectsFromArray:myArray];
Ничего не показывай! Что случилось?
Это вылетает из моего приложения, потому что у меня нет ноля в моемNSMutableArray
как я могу добавить ноль к нему?addobject:nil
не работает, вылетает приложение:
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;