Reputation: 1202
I have multiple timers that working on the main thread.
And I have a NSPopButton.
And I experience a bad behavior, timers just don't work, starting from the point that the use open the pop button's menu until he close the menu.
Any Ideas?
Upvotes: 0
Views: 43
Reputation: 2020
This is probably because your NSTimer is running on the UI thread. You should run it on another thread like so:
NSTimer *myTimer = …
[[NSRunLoop mainRunLoop] addTimer:myTimer forMode:NSRunLoopCommonModes];
Upvotes: 1