[fbcocoa] NSView tip...

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2012 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Thu, 10 May 2012 07:50:01 -0400
Found this in one of my books, and it solved a lot of wonk when using the same view class, but instanced in multiple windows... and it is also an alternative for 'display' etc...you can draw at will,

[myView lockFocus];
// draw here
[myView unlockFocus];

 https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsview_Class/Reference/NSView.html#//apple_ref/occ/instm/NSView/lockFocus

+ focusView
  will almost certainly be a help to some of us eventually...to know the current 'output' view. "Returns the currently focused NSView object, or nil if there is none."



rc