On 24 Dec, 2012, at 08:25 , Quincey Morris <[email protected]> wrote:
> On Dec 23, 2012, at 22:44 , Antonio Nunes <[email protected]> wrote: > >> Currently, in awakeFromNib, I adjust all user facing interface elements to >> the target language, and I had hoped that with wider, and sometimes higher >> controls, the containing sheet/popover would automatically resize to >> compensate for the larger dimensions. It doesn't. I find I need to calculate >> the new size of the container and set it manually. >> >> Is there a way to specify auto layout settings such that all this is taken >> care of automatically by the autlayout system? > > Have you read this: > > > https://developer.apple.com/library/mac/#releasenotes/UserExperience/RNAutomaticLayout/_index.html I had read this, but maybe not thoroughly enough. I'll take a deeper look at it, to see if I can get things working. > 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. -António ---------------------------------------------------- A merry heart does good like medicine ---------------------------------------------------- _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
