Hey
Last year when I was trying to code in xCode for my iPhone I remembered that when I'm using an TableView that xCode would auto generate some code for me for the rows/sections etc.
I've added the implements of datasource etc to my file, but still it wouldn't generate. What am I doing wrong and how can I get those auto generated code back.
Edit:
I'm talking about this code:
Grz
Last year when I was trying to code in xCode for my iPhone I remembered that when I'm using an TableView that xCode would auto generate some code for me for the rows/sections etc.
I've added the implements of datasource etc to my file, but still it wouldn't generate. What am I doing wrong and how can I get those auto generated code back.
Edit:
I'm talking about this code:
Code:
#pragma mark -
#pragma mark Table Data Source Methods
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section { return[list count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *DeleteMeCellIdentifier = @"DeleteMeCellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: DeleteMeCellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DeleteMeCellIdentifier];
}
NSInteger row = [indexPath row];
cell.textLabel.text = [self.list objectAtIndex:row]; return cell;
}
Grz
Last edited: