I currently have some code that does something like this (massively simplified, but enough to illustrate the point):

```
@property (weak) IBOutlet CustomViewClass *customView;

...

for (int i=0; i<iterations; i++) {

    // Crunch some data (Up to ~200,000 operations)...

    // Update view to represent where we are in the process:
    [_customView setNeedsDisplay:YES];

}

```

Whenever I run the code for a given number of iterations, the custom views drawRect: method is only called one time, once all of the iterations have completed.

What I would like is for the view to be forced to be updated after every iteration, and to wait until the view has been redrawn before going onto the next iteration - but I cannot find anywhere in the documentation how to get it working as I would like!

I feel like if I could simply call drawRect: directly that would solve my problem but I know NSView does not allow this!

Could anybody point me in the right direction?