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.
我读过它dispatch_once在应用程序的整个生命周期内只执行一次。这是否意味着当您关闭应用程序并重新启动时,该功能将不会再次执行?
dispatch_once
这意味着每个进程一次。如果您退出应用程序并重新启动它并调用它的代码dispatch_once(),则执行该块。
dispatch_once()