Aislinn는 그냥 NSMutableArray
에 제품 이름을 추가하고있는 tableview 하중이 배열의 항목이 사용자에게 표시합니다.
편집 : 사용자가 제품을 추가 할 수있는 버튼을 클릭
, [arrayName addObject:@"Product Name"]
을 사용합니다. 그런 다음 tableview에서로드하려면 tableview의 대리자 메서드 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{}
을 사용하여 셀에 이름을로드합니다. 이런 식으로 뭔가 :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *identity = @"MainCell";
UITableViewCell *cell;
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identity] autorelease];
cell.textLabel.text = [arrayName objectAtIndex:indexPath.row];
return cell;
}
이 문제에 대해 어떻게 생각하십니까? – AisRuss
@AisRuss 내 대답 업데이트 –