Atlas Wegman
Atlas Wegman

Reputation: 567

NSView drawRect: being erased

For some strange reason parts of my NSView are being erased when another view comes in contact with it. I imagine this is some sort of layer issue, would I be correct in believing that? My first thought was to just constantly redraw the NSView with [self setNeedsDisplay:YES] but that doesn't exactly work (only sometimes), and it makes the animations stutter.

Here are some images to clarify... enter image description here enter image description here enter image description here

Any clue how I can solve this issue? Thanks!

EDIT: Fixed, see below

Upvotes: 0

Views: 149

Answers (1)

Atlas Wegman
Atlas Wegman

Reputation: 567

Use [myView setWantsLayer:YES] on all necessary NSView's to force proper layer based drawing. Hope this helps someone!

enter image description here

Upvotes: 2

Related Questions