开发者

NSStatusItem not shown after sleep

I've got a small Cocoa problem. I have a StatusBar application that has an NSStatusItem in the Menu Bar. It is drawn by a custom View as shown here. When the Main view of the 开发者_开发知识库app is hidden (most of the time), the computer goes to sleep and awakens again, I lose the icon and a blue rectangle is shown. Has anyone of you got any idea what I can do about it. It doesn't happen when the Main View is shown.


The problem was fixed by replacing [theItem drawStatusBarBackgroundInRect:[toolbarView frame]] to [toolbarView setNeedsDisplay:YES]; Thanks AlBlue for getting me in the right direction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜