> On 14 Dec 2020, at 5:39 pm, Eyal Redler via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > button = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]; > [button setTranslatesAutoresizingMaskIntoConstraints:NO]; > [button setBezelStyle:NSRoundedBezelStyle]; > [button setTitle:buttonTitle]; > [button sizeToFit]; > [button setFrameOrigin:NSMakePoint(position, 20)];
Since you're positioning the frames manually, you need to set setTranslatesAutoresizingMaskIntoConstraints = YES instead of NO. -ben _______________________________________________ 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