gpt4 book ai didi

objective-c - NSInvalidArgumentException - 接收者没有带有标识符的 segue

转载 作者:太空狗 更新时间:2023-10-30 03:09:15 26 4
gpt4 key购买 nike

我已经尝试了好几个小时,但没有任何效果。我试图在两个 View Controller 之间进行切换,从一个 tableViewController 到另一个 tableViewController。 segue 连接到顶层 View ,而不是 tableviewcell。 Xcode 中设置的标识符与代码中使用的标识符相同(复制并粘贴)。昨晚它运行良好,但现在我似乎无法让它在不崩溃的情况下继续运行。

这里是调用segue的方法

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

self.photoList = [FlickrFetcher photosInPlace:[self.topPlacesList objectAtIndex:indexPath.row] maxResults:50];
NSLog(@"photolist %@", self.photoList);

NSLog(@"here");

[self performSegueWithIdentifier:@"segue1" sender:self];
NSLog(@"here");
}


-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([segue.identifier isEqualToString:@"segue1"])
{
PhotosTableViewController *photosTVC = segue.destinationViewController;
photosTVC.photoList = self.photoList;
}
}

这是错误报告

2012-08-08 15:28:39.093 Top Places[512:f803] * 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因:'Receiver (PlacesTableViewController: 0x6887ff0) 没有标识符为 'segue1 的 segue ''* 首先抛出调用栈:(0x13c0052 0x1551d0a 0xde24b 0x3efd 0xa771d 0xa7952 0x92f86d 0x1394966 0x1394407 0x12f77c0 0x12f6db4 0x12f6ccb 0x12a9879 0x12a993e 0x17a9b 0x2778 0x26d5)终止调用抛出异常

here is a screenshot of the storyboard http://s14.postimage.org/66wf13q4h/Screen_Shot_2012_08_08_at_3_22_10_PM.png

最佳答案

我能够通过在 Xcode 的“产品”菜单下运行“干净”并在模拟器中重置内容和设置来修复它。

关于objective-c - NSInvalidArgumentException - 接收者没有带有标识符的 segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11874200/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com