Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 iPhone settings.bundle 中,有没有办法在更改设置时发生某些事情,特别是我需要在打开开关时,我想显示一个UIActionSheet,我很确定这是不可能的,但可能好问。
UIActionSheet
作为附加说明,这需要仅使用公共 API 来完成。
这是不可能的,因为您无法在设置应用程序中运行代码。
您不能在设置包中运行代码,但您可以检索设置并将它们存储在其他地方(例如在 Documents 目录中) - 比较两者 - 然后能够在UIActionSheet下次运行应用程序时显示(或类似的)如果相关设置在此期间已更改。
这可能不是您正在寻找的直接内容,但我有一种感觉,这是您将得到的最接近的!