문제

My problem is that my application's window blocks when I raise a method that represents values in a NSTableView. I want to do an animation with a NSProgressIndicator (spinner), but my window is blocked and spinner doesn't show animation. I want if anybody can give me any hint? I thought in threads or something like this, but I'm not pretty sure how to solve this issue.

도움이 되었습니까?

해결책

You're right, you need some kind of multithreading. Fortunately, it's rather easy to do simple operations on threads in Cocoa.

You should look into NSOperation and NSOperationQueue.

You may find this blogpost useful: turbo charging your apps with nsoperation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top