-
[iPhone 프로그래밍] UITableView DataSource 기본틀0x05 Programming/iPhone Programing 2010. 11. 16. 12:48
필요할때 쓰기위해 남겨둡니다. ㅎㅎ
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 0;
}
-(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];
}
// Configure the cell...
cell.textLabel.text =[m_itemArray objectAtIndex:indexPath.row];
return cell;
}