nsnotifications

    2熱度

    1回答

    我想合併NSNotifications發生在很短的時間內。我試過如下: [[NSNotificationQueue defaultQueue] enqueueNotification:[NSNotification notificationWithName:kMyNotificationName object:self]postingStyle:NSPostWhenIdle coalesceMas

    3熱度

    1回答

    是否有任何可以通過iOS上的NSNotificationCenter發佈的默認通知列表?我想知道是否有任何可觀察的應用程序啓動事件等可能通過NSNotificationCenter觀察到。我無法在網上找到任何參考,但認爲某人在這裏可能知道。謝謝你提供的所有幫助!

    1熱度

    2回答

    我有一個標籤欄應用程序,其中有2個選項卡(2個視圖控制器)。我需要從標籤2(視圖控制器2)向標籤1(視圖控制器1)發佈通知。但問題是,我必須首先去標籤1(視圖控制器1)爲了註冊通知,如果我不這樣做,通知從未註冊。看來只有一次選擇它才分配視圖,然後移動到標籤2(視圖控制器2)發佈通知。 在寄存器通知在viewDidLoad中和viewWillAppear中是這樣的: [[NSNotification

    0熱度

    1回答

    我有NSButton自定義類稱爲MyButton,我發佈一個通知一個quicksave MyButton.m: -(void)mouseDown:(id)sender{ [super mouseDown:sender]; [super mouseUp:sender]; [[NSNotificationCenter defaultCenter] postNotifica

    -1熱度

    3回答

    我目前正試圖讓NSNotification工作,但我遇到了一些麻煩。 我有兩個(2)ViewControllers:A. MainViewController & B. LoginViewController。 在我的MainViewController我有一個註銷按鈕,將發送一個URL到我的LoginViewController加載它(不顯示我的loginView)。但是,它不起作用。 在我Ma

    4熱度

    4回答

    我瞭解通知,海報和觀察者的內容。 但我很難理解我們的應用程序或操作系統是如何理解並將標誌/通知發送給觀察員級的? 這是什麼機制? 您的回答和幫助將不勝感激。 謝謝 ID。

    0熱度

    1回答

    我說通知我的UIViewController捕 - (void)applicationWillResignActive:(UIApplication *)application: 這樣 - (void)viewDidLoad { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(a

    0熱度

    2回答

    我用這個作爲觀察員: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(newConnection:) name:NSFileHandleConnectionAcceptedNotification o

    0熱度

    3回答

    我要做到以下幾點: 1. display loader 2. download database update and reload data 3. hide loader 我的想法是,在開始時,在數據庫的更新方法的主視圖控制器的結束髮送通知,從而使視圖控制器顯示並隱藏裝載機。 我很擔心控制流程。我有沒有保證視圖控制器會在數據庫的更新方法進行之前收到通知並顯示加載器?

    1熱度

    2回答

    我現在正在學習通知編程,有一個非常簡單的項目有兩個類,有一些問題,在發佈通知時不會調用通知選擇器方法。這很奇怪,希望有人幫我找到問題發生的地方,我非常感謝! 我的源代碼: ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property (weak, nonatom