Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle -[NSView isFlipped] when rendering the rootView of a TUIViewNS…

…ViewContainer
  • Loading branch information...
commit 05887163b5cf986770f7e278dc3241fc79ccec5d 1 parent 70bed0d
@jspahrsummers jspahrsummers authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/UIKit/TUIViewNSViewContainer.m
View
8 lib/UIKit/TUIViewNSViewContainer.m
@@ -163,7 +163,15 @@ - (void)drawRect:(CGRect)rect {
}
CGContextRef context = [NSGraphicsContext currentContext].graphicsPort;
+ CGContextSaveGState(context);
+
+ if ([self.rootView isFlipped]) {
+ CGContextTranslateCTM(context, 0, self.bounds.size.height);
+ CGContextScaleCTM(context, 1, -1);
+ }
+
[self.rootView.layer renderInContext:context];
+ CGContextRestoreGState(context);
}
- (void)startRenderingContainedView; {
Please sign in to comment.
Something went wrong with that request. Please try again.