开发者

Slider set to continuous seems to block main thread

I'm using a slider to resize some thumbnails in an app. I've set the slider to continuous so it updates as you move the slider instead of when you finish moving it. Works great, except for one thing:

The view that contains the thumbnails the slider resizes in in a split view. When the user starts sliding, i want to maximize said splitview for better usability. The only issue is, while the slider is being开发者_如何学Python moved, it appears to be blocking any resizing operations of the UI. Anyone know how I can un-block it?

Or perhaps know of a different approach?


I figured it out!

Dragging the slider changes the run loop mode. I was maximizing my split view using an animation which has an NSTimer as it's backbone. I was adding the timer to the default run loop mode, when i should have been doing this:

[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜