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.
的文档NSUserDefaults说该synchronise方法是定期调用的,但没有提及频率。10 分钟的谷歌搜索没有发现任何东西。
NSUserDefaults
synchronise
synchronise该方法的调用频率如何?
这是一个未公开的实现细节(可能甚至不是一个恒定的时间间隔)。但是,您可以通过执行调配方法- [NSUserDefaults synchronize]并更改其实现以便在NSLog()每次同步时调用它自己来发现它。
- [NSUserDefaults synchronize]
NSLog()