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.
我正在目标 c 中构建一个框架,我必须在应用程序启动时收到通知,我可以添加观察者来跟踪框架中的应用程序启动吗?,我不希望应用程序 didBecome 主动通知,因为即使从后台返回它也会被调用,
我想要新的发布通知,请帮助我如何实现这一点
这将在您的应用首次启动时执行块。
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) { // your code here }];
我在登录 .ctp 文件中有这段代码:
<?php echo $this->Form->create('AdmUser', array( 'class' => 'form-vertical', 'inputDefaults' => array( 'label' =>