基于 NavigationController 的应用程序,视图加倍,并且重影图像从屏幕右侧缓慢漂移

发布于 2024-12-04 03:43:35 字数 415 浏览 0 评论 0原文

这太奇怪了。我已经花了近 2 个月的时间对同一个应用程序进行一系列迭代,几周没有接触与视图管理相关的代码,这个错误就出现了。

基本上我位于根级别视图,我通过“跳过”类型按钮转到堆栈中的最后一个视图。该页面用于设置。然后我更改一些内容(与视图层次结构无关)并保存,这使我回到根目录。然后我尝试转到堆栈中的第一个视图。

最初,视图的所有文本字段都是可见的,但它们的 uilabel 不可见。然后视图慢慢向右漂移,显示相同的视图,其正下方的标签完好无损。在 2 年多的 iOS 开发过程中,我从未见过这样的 bug,所以我就来了。

上周我更改的唯一代码与 Web 服务和线程相关,与视图层次结构无关。

如果有人以前见过这个错误,请帮忙!可能也很重要,我还没有在模拟器上看到这种情况发生,只在实际设备上发生(iPad 运行 4.3.3)

谢谢!

This is so weird. I have been working on a series of iterations of the same application for almost 2 months, have not touched the code related to the view management in weeks, and this bug just appeared.

Basically I am at the root level view, i go to the last view in the stack by way of a "skip" type button. This page is used for settings. I then change some things (not related to the view hierarchy) and save, which takes me back to root. Then i try going to the first view in the stack.

Initially all of the textfields for the view are visible, but their uilabels are not. The view then slowly drifts to the right, revealing the same view with labels intact directly under it. I have never seen a bug like this before in over 2 years of iOS dev, so here I am.

The only code I have changed in the last week is related to web services and threading, nothing having to do with the view hierarchy.

If anyone has seen this bug before please help! Probably important as well, I have not seen this happen on the simulator, only on the actual device (iPad running 4.3.3)

Thanks!

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

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

发布评论

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

评论(1

萌吟 2024-12-11 03:43:35

线程是最有可能的罪魁祸首:在主线程以外的任何地方进行 UI 调用可能会导致许多奇怪的问题。确保您对 UI 所做的任何操作(甚至是 -popViewControllerAnimated:)都包含在 -performSelectorOnMainThread:withObject:waitUntilDone: 或适当的 dispatch_async(dispatch_get_main_queue( ), ^{...}) 调用。

Threading is the most likely culprit: making UI calls anywhere other than the main thread can cause any number of strange problems. Make sure anything you do to the UI, even a -popViewControllerAnimated:, is wrapped in a -performSelectorOnMainThread:withObject:waitUntilDone: or an appropriate dispatch_async(dispatch_get_main_queue(), ^{...}) call.

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