UINavigationController popView 行为

发布于 2024-10-08 05:59:06 字数 827 浏览 1 评论 0原文

我正在编写一个 iPhone 应用程序,但遇到了 UINavigationController bug 的问题,我无法随意复制。

我有 3 个表格视图,最后有一个详细/普通 UIView。有时,当我从详细视图导航回表视图时,它会做一些有点奇怪的事情:

标题将动画(因此它将执行滑动操作,标题将变回预期的内容),但内容不会t。

(标题 v 内容)

T1     ->     T2      ->     T3     ->     D1

T1Content     T2Content      T3Content     D1Content          [Hit Back Button]

T1     <-     T2      <-     T3     <-

T2Content     T3Content      T3Content

然后再返回,这是一个 SEG_FAULT。

我确信我一路上做了一些奇怪的事情 - 但我真的不知道是什么,所以任何关于这种方式可能会出现哪些错误的建议将不胜感激。

谢谢,

皮特。

编辑 - 包括代码:

// Push view code
[self.navigationController pushViewController:updateController animated:YES];
[updateController release];     

// Pop view code
[self.navigationController popViewControllerAnimated:YES];

i'm writing an iPhone app and i'm having problems with a UINavigationController bug that i can't replicate at will.

I have 3 table views and at the end a detail / normal UIView. Occasionally when i navigate back from the detail view back into the table views it does something a bit weird:

The title will animate (so it will do the slidy thing and the title will change back to what is expected), but the content doesn't.

(Titles v Content)

T1     ->     T2      ->     T3     ->     D1

T1Content     T2Content      T3Content     D1Content          [Hit Back Button]

T1     <-     T2      <-     T3     <-

T2Content     T3Content      T3Content

And then go back further and it's a SEG_FAULT.

I'm sure this is me doing something weird along the way - but i don't really know what, so any suggestions on what mistakes might manifest themselves this way would be hugely appreciated.

Thanks,

Pete.

edit - include code:

// Push view code
[self.navigationController pushViewController:updateController animated:YES];
[updateController release];     

// Pop view code
[self.navigationController popViewControllerAnimated:YES];

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

惜醉颜 2024-10-15 05:59:06

没有将内容推送两次 - 这是一些代码试图让 T2 视图删除一行,但是以漂亮的表格方式。我这样做的唯一方法是在 T3 完成时存储一个临时变量,然后在视图加载后执行表删除 - 整个过程中的某些内容不正确,但表现得像所描述的那样。

奇怪的。

不管怎样,谢谢,

皮特。

wasn't pushing the content twice - it was some code that tried to get the T2 view to remove a row, but in the nice table way. only way i did that was to store a temporary variable when T3 had finished, and then execute the table delete after the view had loaded - and something in that whole process wasn't right, but manifested itself like described.

odd.

thanks anyway,

pete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文