2012-03-31 44 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]]