Segue 调用后应用程序崩溃

发布于 2024-12-19 12:37:58 字数 1028 浏览 1 评论 0原文

我有一个在 iPad 上运行的应用程序。在视图(view1)中,用户可以单击一些对象。当单击一个对象时,我将显示另一个屏幕,其中包含有关视图 2 上的对象的一些详细信息。

视图 1 嵌入在导航控制器中,我创建了一个从视图 1 到视图 2 的 Segue,称为 mySeq,类型为推送。

当用户单击一个对象时,将调用以下函数:

- (void)easyTableView:(EasyTableView *)easyTableView selectedView:(UIView *)selectedView atIndex:(NSUInteger)index deselectedView:(UIView *)deselectedView {
[self borderIsSelected:YES forView:selectedView];       
if (deselectedView) 
    [self borderIsSelected:NO forView:deselectedView];

UILabel *label  = (UILabel *)selectedView;
bigLabel.text   = label.text;
    NSLog(@"Dette er en tekst");
    [self performSegueWithIdentifier:@"mySeg" sender:self];
}

view2 显示信息和所有内容。但是当我单击视图时 - 无论在哪里 - 应用程序都会崩溃。

xcode 告诉我它在我的 appdelegate 中的这一行:

    return UIApplicationMain(argc, argv, nil, NSStringFromClass([EasyTableAppDelegate class]));
}

错误代码: 程序收到信号:EXEC_BAD_ACCESS

,所以显然存在某种内存违规。

但我错过了什么?我需要一些额外的设置还是???

没有任何线索。

感谢您的任何意见。

i have an application running on an iPad. in view (view1) one there are some objects the user can click. when an object is clicked i'll show another screen containg some detail information about the object on view 2.

view1 is embedded in a navigational controller and i've created a segue from view1 to view 2 called mySeq and of type push.

when the user click an object the following function is called:

- (void)easyTableView:(EasyTableView *)easyTableView selectedView:(UIView *)selectedView atIndex:(NSUInteger)index deselectedView:(UIView *)deselectedView {
[self borderIsSelected:YES forView:selectedView];       
if (deselectedView) 
    [self borderIsSelected:NO forView:deselectedView];

UILabel *label  = (UILabel *)selectedView;
bigLabel.text   = label.text;
    NSLog(@"Dette er en tekst");
    [self performSegueWithIdentifier:@"mySeg" sender:self];
}

view2 shows up with information and all. but when i click on the view - no matter where - the app crashes.

xcode tells me that it is in this line in my appdelegate:

    return UIApplicationMain(argc, argv, nil, NSStringFromClass([EasyTableAppDelegate class]));
}

errorcode:
Program received signal: EXEC_BAD_ACCESS

so obviously some kind of memory violation.

but what am i missing? do i need some extra setup or???

haven't got a clue.

thanks for any input.

kim

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文