- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
{
// other stuff might happen here
if ([self showsFirstResponder]) {
// showsFirstResponder is set for us by the NSControl that is drawing us.
NSRect focusRingFrame = cellFrame;
focusRingFrame.size.height -= 2.0f;
[NSGraphicsContextsaveGraphicsState];
NSSetFocusRingStyle(NSFocusRingOnly);
[[NSBezierPath bezierPathWithRect: NSInsetRect(focusRingFrame, 4.0f, 4.0f)] fill];
[NSGraphicsContext restoreGraphicsState];
}
// other stuff might happen here
}
// Obtain the shared director in order to...
CCDirector *director = [CCDirector sharedDirector];
// Enables High Res mode
if ([UIScreen instancesRespondToSelector:@selector(scale)]) {
[director setContentScaleFactor:[[UIScreen mainScreen] scale]];
}