iPhone模拟器调试时刷新/重绘视图?

发布于 2024-08-21 00:49:01 字数 71 浏览 6 评论 0原文

有人知道调试代码时如何重绘视图吗? 当 Xcode 处于调试器模式时,不刷新屏幕。如果我添加视图或按钮,屏幕上不会显示任何内容!

anyone does knows how redraw a view when debugging code?
When Xcode is in the debugger mode, doesn't refresh the screen. If I add a view or a button, nothing is show on the screen!

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

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

发布评论

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

评论(3

℉絮湮 2024-08-28 00:49:01

如果您正在寻找 swift 等效项:

(lldb) expr CATransaction.flush()

只要您手动设置表达式语言,您仍然可以在 swift 上下文中使用 Objective-C 版本:

(lldb) expr -l objc -- (void)[CATransaction flush]

If you're looking for the swift equivalent:

(lldb) expr CATransaction.flush()

You can still use the objective-c version in a swift context so long as you manually set the expression language:

(lldb) expr -l objc -- (void)[CATransaction flush]
回忆追雨的时光 2024-08-28 00:49:01

否 - 您需要重建项目,以便将最新的应用程序部署到模拟器

No - you need to rebuild the project so it deploys the latest app to the Simulator

谁人与我共长歌 2024-08-28 00:49:01

当应用程序暂停时,您可以在调试器中使用下面的 LLDB 命令在模拟器或设备上进行实时更新:

 (lldb) e (void)[CATransaction flush]

如果您有 Chisel 使用别名 caflush

When the application is paused you can update live in the simulator or on the device while you are still in the debugger using the LLDB command below:

 (lldb) e (void)[CATransaction flush]

if you have Chisel use the alias caflush

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