Skip to content

Instantly share code, notes, and snippets.

Avatar

Shaheen Gandhi visigoth

View GitHub Profile
View gist:1073911
- (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;
}
View gist:715903
@interface HostView : NSView {
NSView *_docView;
CGFloat _scale;
}
@property (assign) CGFloat scale;
@end