-
-
Save adrienbrault/1175242 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)drawRect:(NSRect)dirtyRect | |
{ | |
NSGraphicsContext *graphicContext = [NSGraphicsContext currentContext]; | |
CGContextRef context = [graphicContext graphicsPort]; | |
// Set the origin of the coordinate system in the upper left corner instead of the lower left corner. | |
CGContextConcatCTM(context, | |
CGAffineTransformMake(1.0, 0.0, 0.0, -1.0, 0.0, self.frame.size.height)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)isFlipped | |
{ | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment