Created
July 9, 2011 20:06
-
-
Save visigoth/1073911 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)updateFrame { | |
NSRect frame = _docView.frame; | |
// When in landscape mode, flip around the width/height. | |
if ([_docView frameRotation] == 90.) { | |
CGFloat t = frame.size.width; | |
frame.size.width = frame.size.height; | |
frame.size.height = t; | |
} | |
// Scale the frame. | |
frame.size.width = frame.size.width * _scale; | |
frame.size.height = frame.size.height * _scale; | |
self.frame = frame; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment