equal
deleted
inserted
replaced
48 } |
48 } |
49 |
49 |
50 |
50 |
51 // Customize the appearance of table view cells. |
51 // Customize the appearance of table view cells. |
52 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
52 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
53 |
|
54 static NSString *CellIdentifier = @"Cell"; |
53 static NSString *CellIdentifier = @"Cell"; |
55 |
54 |
56 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
55 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
57 if (cell == nil) { |
56 if (cell == nil) { |
58 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
57 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
93 #pragma mark - |
92 #pragma mark - |
94 #pragma mark Table view delegate |
93 #pragma mark Table view delegate |
95 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
94 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
96 // Navigation logic may go here. Create and push another view controller. |
95 // Navigation logic may go here. Create and push another view controller. |
97 /* |
96 /* |
98 <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; |
97 DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; |
99 // ... |
98 // Pass the selected object to the new view controller. |
100 // Pass the selected object to the new view controller. |
99 [self.navigationController pushViewController:detailViewController animated:YES]; |
101 [self.navigationController pushViewController:detailViewController animated:YES]; |
100 [detailViewController release]; |
102 [detailViewController release]; |
101 */ |
103 */ |
|
104 detailViewController.detailItem = [[NSString alloc] initWithFormat:@"%d", [indexPath row]]; |
102 detailViewController.detailItem = [[NSString alloc] initWithFormat:@"%d", [indexPath row]]; |
105 } |
103 } |
106 |
104 |
107 |
105 |
108 #pragma mark - |
106 #pragma mark - |