On 24 Dec, 2012, at 11:22 , Antonio Nunes <devli...@sintraworks.com> wrote:
>> It seems to me that changing the UI elements in awakeFromNib probably isn't >> enough, since that doesn't tell the layout system that something has >> changed. Anyway, these documents try to explain the correct place to make >> the adjustments (see "Core Layout Runtime"), though it might take some >> studying. >> >> It may also be that the container view *is* resizing due to the updated >> layout conditions, but something else is forcibly doing a setFrame on it >> shortly afterwards. Do any of the layout debugging aids (see "Debugging") >> tell you what the sequence of events is in your case? > > If I manually set the view's frame in awakeFromNib then the popover/sheet > will have the correct size. > > An NSLog(@"%@", [self.view > constraintsAffectingLayoutForOrientation:NSLayoutConstraintOrientationHorizontal]); > results in an empty list, which I find surprising. The constraints are > certainly there in IB. The reason I did not find the constraints was because I was requesting them too early (before the view had been added to a window). I now managed to get the view to display correctly by calling [self.view layoutSubtreeIfNeeded] after localising the controls. -António ---------------------------------------------------- There is nothing as strong as real gentleness, and there is nothing as gentle as real strength. ---------------------------------------------------- _______________________________________________ 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