On Sun, Jul 24, 2011 at 10:00 PM, Daniel Waylonis <d...@nekotech.com> wrote: > Hi Kyle, > If you're back from vacation, could you describe how things were fixed in > OmniPlan?
I've got a blog post in the editing phase describing all the things we do to get NSScrollViews working, but the only other thing we do that I can think of is to swizzle -[NSClipView scrollToPoint:] to look like the following: - (void)scrollToPoint:(NSPoint)newOrigin { originalScrollToPoint(self, _cmd, newOrigin); [self fixLayerGeometry]; [[self subviews] makeObjectsPerformSelector:@selector(fixLayerGeometry)]; } -[NSView(LayerBackedFix) fixLayerGeometry] is defined like this: - (void)fixLayerGeometry { if (![self layer]) return; [CATransaction begin]; [CATransaction setDisableActions:YES]; for (NSView *subview in [self subviews]) { CALayer *layer = [subview layer]; CGPoint layerPosition = NSPointToCGPoint([self convertPointToBase:[subview frame].origin]); // note: on Lion, we want to use -convertPointToBacking: instead. layer.position = layerPosition; } [CATransaction commit]; } Pay attention to that note, since on Lion base coordinate systems don't mean the same thing as backing coordinate systems. I'm going to CC this to the list, since it's helpful information. Hope that helps! --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com