I have a ScreenSaverView instantiated and added to a window of a stand-alone app like this:
In MasterViewController: - (void) viewDidLoad { [super viewDidLoad]; saver_ = [[ArtSaverView alloc] initWithFrame: self.view.frame isPreview: NO ]; [self.view addSubview: saver_]; [saver_ setTranslatesAutoresizingMaskIntoConstraints: NO]; NSLayoutConstraint *left = [NSLayoutConstraint constraintWithItem: saver_ attribute: NSLayoutAttributeLeft relatedBy: NSLayoutRelationEqual toItem: self.view attribute: NSLayoutAttributeLeft multiplier: 1.0 constant: 0.0]; NSLayoutConstraint *right = [NSLayoutConstraint constraintWithItem: saver_ attribute: NSLayoutAttributeRight relatedBy: NSLayoutRelationEqual toItem: self.view attribute: NSLayoutAttributeRight multiplier: 1.0 constant: 0.0]; NSLayoutConstraint *top = [NSLayoutConstraint constraintWithItem: saver_ attribute: NSLayoutAttributeTop relatedBy: NSLayoutRelationEqual toItem: self.view attribute: NSLayoutAttributeTop multiplier: 1.0 constant: 0.0]; NSLayoutConstraint *bottom = [NSLayoutConstraint constraintWithItem: saver_ attribute: NSLayoutAttributeBottom relatedBy: NSLayoutRelationEqual toItem: self.view attribute: NSLayoutAttributeBottom multiplier: 1.0 constant: 0.0]; [self.view addConstraints: @[left, right, top, bottom] ]; // ... } ArtSaverView is declared like this: @interface ArtSaverView : ScreenSaverView <NSTextViewDelegate, CALayerDelegate, CAAnimationDelegate> The animation works fine. Also, the MasterViewController's view has autoresizesSubviews = true, AFAICS, ... However, when I resize the window (using the mouse), the screensaverview does not get resized. The area around the original view just remains grey and the frame of the screensaver view keeps its original value. I have checked that -viewDidEndLiveResize does get called. But the view's new frame is still the old one. I must be missing something, please advise. Thanks a lot in advance. Gab. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com