swift - Refreshing of Menu Bar View when NSMenu is opened -


i developing app, has custom view in menu bar. menu bar custom nsview redrawn every second. when open nsmenu of view, view freezes , no longer redraws itself. using

self.graph.needsdisplay = true 

to trigger redraw.

is possible refresh nsview in menu bar when nsmenu opened?

turns out duplicate of this topic

the solution add timer runloop:

runloop.main.add(timer, formode: .commonmodes) 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -