Hello
Я делаю простую программу, которая принимает ввод от пользователя и сохраняет его как NSMutableArray, я передаю этот NSMutableArray другому классу, который является подклассом UITableViewController, используя метод. NSMutableArray правильно передан, и я могу видеть его с помощью NSLog. но я хочу видеть NSMutableArray в ячейках моей таблицы.
Я пишу это следующим кодом, но я думаю, что он не перекодирует UITabBarController, поэтому, пожалуйста, посмотрите код и помогите мне ...
-(void) myMethodNew:(NSMutableArray*)allOrders {
sameallOrders = [[NSMutableArray alloc] init];
[sameallOrders addObject:allOrders];
NSLog(@"%@", sameallOrders);
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [sameallOrders count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
NSString *cellValue = [sameallOrders objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
return cell;
}
если вы не можете понять что-то, что я сделал, спросите меня, я снова объясню правильно, помогите мне ....
Я определенно буду хвалить ...