2012-12-22 33 views
1

我使用ctrl將我的UITableViewController連接到NavigationController,將segue定義爲「模式」並定義了segue標識符「DetailEvent」。控制器沒有標識符

在類我的UITableViewController的我加入這個代碼:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{  
    NSLog(@"Row Selected = %i",indexPath.row); 
    [self performSegueWithIdentifier:@"DetailEvent" sender:self.view]; 
} 

錯誤:

Row Selected = 1 
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<AvailableEventsController: 0xa335500>) has no segue with identifier 'DetailEvent'' 
*** First throw call stack: 
(0x175b012 0x1580e7e 0x5aa492 0xa6b53fa 0x103a0 0x5778d5 0x577b3d 0xf7ee83 0x171a376 0x1719e06 0x1701a82 0x1700f44 0x1700e1b 0x23ee7e3 0x23ee668 0x4c865c 0xbf7d 0x2755) 
libc++abi.dylib: terminate called throwing an exception 

什麼我錯在這裏做什麼?

+0

你提到了故事板中的標識符嗎? –

+0

標識符在故事板中設置爲「DetailEvent」。 – doonot

+0

[self performSegueWithIdentifier:@「DetailEvent」sender:nil]; –

回答

0

我正在研究StoryBoard中的一個不同的UIViewController。