Created
July 8, 2012 02:42
-
-
Save inonb/3069083 to your computer and use it in GitHub Desktop.
[iOS] テーブルビューの遷移
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| // セルのタイトルを取得 | |
| NSString *name; | |
| if (indexPath.row == 0) { | |
| name = @"name01"; | |
| } else if (indexPath.row == 1) { | |
| name = @"name02"; | |
| } else if (indexPath.row == 2) { | |
| name = @"name03"; | |
| } | |
| self.detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; | |
| self.detailViewController.detailItem = name; | |
| [self.navigationController pushViewController:self.detailViewController animated:YES]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment