Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Merge pull request #9 from grahammiln/autolayout
Browse files Browse the repository at this point in the history
Adding autolayout support to `GCZoomView`
  • Loading branch information
grahammiln committed Jan 2, 2015
2 parents 88018bf + 17eea45 commit 75e5ecf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Individual Contributors
Graham Cox <http://apptree.net/appcontact.htm>
Graham Miln <[email protected]>
Jason Jobe
Stephan Zehrer <http://www.stephan-zehrer.de>
18 changes: 18 additions & 0 deletions framework/Code/GCZoomView.m
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,24 @@ - (id)initWithFrame:(NSRect)frame
return self;
}

- (id)initWithCoder:(NSCoder *)coder
{
if ((self = [super initWithCoder:coder])) {
if ([self respondsToSelector:@selector(setTranslatesAutoresizingMaskIntoConstraints:)]) {
[self setTranslatesAutoresizingMaskIntoConstraints:YES];
}

m_scale = 1.0;
mMinScale = 0.025;
mMaxScale = 250.0;

mRT = [[DKRetriggerableTimer retriggerableTimerWithPeriod:kDKZoomingRetriggerPeriod
target:self
selector:@selector(stopScaleChange)] retain];
}
return self;
}

- (void)dealloc
{
[mRT release];
Expand Down

0 comments on commit 75e5ecf

Please sign in to comment.