- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([indexPath section] == 0) {
switch ([indexPath row]) {
case 0:
[self renameExercise];
[[self tableView] deselectRowAtIndexPath:indexPath
animated:YES];
break;
case 1:
EditRootNoteViewController *newController = [[EditRootNoteViewController alloc] initWithNibName:@"EditNoteView"
bundle:nil];
[newController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[newController setDelegate:self];
[self presentModalViewController:newController
animated:YES];
[newController release];
break;
xCode'期待EditRootNoteViewController之前的表達式......但爲什麼來?這段代碼在這個開關之外工作......這可能是某種線索,但我一點也沒有。爲什麼這段代碼無法工作?
這不是一個完整的方法,我認爲我在幫助之後不包括這些東西,但是我可以看到這可能是第一個想法。謝謝。 – griotspeak 2010-10-04 00:59:37
交換語句不需要有默認情況。 – JeremyP 2010-10-04 09:23:26