Start adding logic to process constraints

This commit is contained in:
Gregory John Casamento 2020-06-03 07:12:31 -04:00
parent af2319d26e
commit a4a30889f7

View file

@ -30,6 +30,7 @@
#import "AppKit/NSView.h"
#import "AppKit/NSAnimation.h"
#import "AppKit/NSLayoutConstraint.h"
#import "AppKit/NSWindow.h"
static NSMutableArray *activeConstraints;
@ -229,6 +230,11 @@ static NSMutableArray *activeConstraints;
_multiplier = multiplier;
_constant = constant;
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(_handleWindowResize:)
name: NSWindowDidResizeNotification
object: [_firstItem window]];
[activeConstraints addObject: self];
}
return self;
@ -380,7 +386,11 @@ static NSMutableArray *activeConstraints;
_secondItem = [coder decodeObject];
}
}
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(_handleWindowResize:)
name: NSWindowDidResizeNotification
object: [_firstItem window]];
[activeConstraints addObject: self];
return self;
@ -448,5 +458,10 @@ static NSMutableArray *activeConstraints;
_constant];
}
- (void) _handleWindowResize: (NSNotification *)notification
{
NSLog(@"Resized");
}
@end