2012-03-31 22 views
1

我使用NSFileHandle readInBackgroundAndNotify從管道讀取數據。但是,直到應用程序系統狀態欄菜單打開,我沒有收到NSFileHandleReadCompletionNotification通知。如果菜單被摺疊,一切正常。NSFileHandle readInBackgroundAndNotify和NSMenu

如何解決這個問題?

+0

OK,問題解決了。 – pawel84 2012-04-02 16:42:24

回答

0

一切都開始工作,因爲它應該從改變NSFileHandle通話

後:

[handle readInBackgroundAndNotify]

到:

[handle readInBackgroundAndNotifyForModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]