Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top