I made up a NSScrollView within IB and checked the allow magnification
box. What does this actually do?
This is what I found in Apples examples where a manual magnification is implemented:
- (void)magnifyWithEvent:(NSEvent *)event {
[resultsField setStringValue:
[NSString stringWithFormat:@"Magnification value is %f", [event magnification]]];
NSSize newSize;
newSize.height = self.frame.size.height * ([event magnification] + 1.0);
newSize.width = self.frame.size.width * ([event magnification] + 1.0);
[self setFrameSize:newSize];
}
Using allow magnification
also resizes everything within the view so it can't be, like above, setting the frame size.
So is it something like using scaleUnitSquareToSize:
to manipulate the coordinate system?