UINavigationController popView 行为
我正在编写一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有将内容推送两次 - 这是一些代码试图让 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.