Cocoa NSNotificationCenter 应用程序之间通信失败
我需要在两个不同的控制台应用程序(观察者和客户端)之间进行通信。 在观察者应用程序中,我添加了以下代码: [[NSNotificationCenter defaultCenter…
多个对象订阅 NSNotification (Objective-c)
我有一个订阅 MyNSNotification 的 Objective-c 类 MyClass。我的应用程序中有多个 MyClass 实例。因此多个对象会收到通知。 有没有办法“过滤”特定…
视图上的事件显示更改(Youtube MPMoviePlayerViewController)
我想知道在单击允许在 iOS 中播放视频的 UIWebView 之后 YouTube MPMoviePlayerViewController 何时出现(以编程方式),以获取并控制该视图。 因为我…
NSNotificationCenter 选择器参数
我不仅想调用 NSNotification 中的方法,还想调用方法的参数 类似的东西 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selecto…
如何为 Nslocal 通知设置自定义重复间隔......?
我是 iphone 开发新手。我正在尝试在我的项目中使用 NslocalNotification 我需要每 2 小时或每两天或每两个月等给出提醒。目前我正在使用 NslocalNoti…
收到通知的次数多于发送通知的次数
我有一个奇怪的问题。 我有一个通过调用通知中心来发送通知的方法,如下所示: [[NSNotificationCenter defaultCenter] postNotificationName:@"NIDNe…
带参数的 NSNotificationCenter
我正在实现一个基于音频的应用程序。我使用两个 AVPlayer 播放两种不同的声音。声音播放后我需要执行不同的操作。为此我使用了 NSNotifications。但我…
NSNotification 的问题关闭模态视图控制器
因此,我有一个 tabbarcontroller,当触摸特定的 tabBarItem 时,我会向 dismissModalViewController 传递通知。 它运行良好,模态视图控制器已被关闭…
NSNotification 到达时对象已损坏
我以这种方式发布通知: ... IVSession *newSession = [[[IVSession alloc] initWithDictionary:propertyDict] autorelease]; NSDictionary *notifPar…
访问 NSNotification 中传递的对象?
我有一个正在发布 NSDictionary 的 NSNotification: NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys: anItemID, @"ItemID", [NSS…
applicationDidChangeScreenParameters 和 [NSWindow orderOut:]
在我的应用程序中,应用程序的窗口必须在系统更改分辨率时关闭。虽然实现 - (void)applicationDidChangeScreenParameters:(NSNotification *)notifica…
如何访问 applicationDidBecomeActive 上的远程推送通知数据?
当应用程序在后台收到远程推送通知时,应用程序进入 applicationDidBecomeActive。从那里,我如何从通知中访问数据的 NSDictionary?…
NSUserDefaultsDidChangeNotification 在应该触发时没有触发或者根本没有?
在我的应用程序中,我已在 awakeFromNib 中注册了 NSUserDefaultsDidChangeNotification 通知以及其他通知(工作正常)。我如下所示注册它,这似乎是…