cocoa - NSPopupButton menu prerender? -
i have nspopubutton, , first time open it, it's slow, because draws lot of things. second time , each time after that, it's fast.
what can menu prerendered, opens fast first time?
so far, i've tried creating menu in applicationwilllaunch, , after creating it, call popupmenupositioningitem:atlocation:inview:.
this works fine, problem displays menu on screen. tried creating offscreen window , view, , opening menu there, gets drawn inside screen.
is there way prerender menu, or display force offscreen?
thanks.
you should find out why takes long. it's sort of file-activity (like loading images or data) or computation. don't think it's drawing (it draw each time).
use "time profiler" or "file activity" instruments find offending method calls. either optimize code or call beforehand.
Comments
Post a Comment