【问题标题】:Is it possible to set a symbolic breakpoint for when an iOS device turns to landscape?是否可以为 iOS 设备转向横向设置符号断点?
【发布时间】:2022-12-03 19:47:33
【问题描述】:

我正在调试设备意外转向横向并返回纵向的问题,并试图找到它的根本原因。

【问题讨论】:

    标签: ios xcode lldb


    【解决方案1】:

    lldb 中使用其中任何一个:

    b -[UIDevice setOrientation:animated:]
    b -[UIWindow _updateToInterfaceOrientation:duration:force:]
    

    那是 Apple 私有 API,因此无法保证未来的 iOS 版本,但在横向/纵向旋转时,我确实遇到了一个断点:

    • iOS12.4.1
    • iOS15.1
    • iOS16.1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-11
      • 1970-01-01
      • 2019-02-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多