Skip to content

Conversation

@bryanvrgsc
Copy link

  • Add NSTimer to update remaining time every second
  • Use NSRunLoopCommonModes so timer fires while menu is open
  • Implement menuWillOpen: and menuDidClose: delegates
  • Timer starts when menu opens, stops when menu closes

The timer must use NSRunLoopCommonModes because the menu tracking uses NSEventTrackingRunLoopMode, not the default mode.

- Add NSTimer to update remaining time every second
- Use NSRunLoopCommonModes so timer fires while menu is open
- Implement menuWillOpen: and menuDidClose: delegates
- Timer starts when menu opens, stops when menu closes

The timer must use NSRunLoopCommonModes because the menu tracking
uses NSEventTrackingRunLoopMode, not the default mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant