Re: Set the size of a sheet when it's first loaded
Re: Set the size of a sheet when it's first loaded
- Subject: Re: Set the size of a sheet when it's first loaded
- From: Sandor Szatmari <email@hidden>
- Date: Thu, 25 Aug 2016 08:22:42 -0400
Shane,
> On Aug 25, 2016, at 04:28, Shane Stanley <email@hidden> wrote:
>
> I have a window that is shown as a sheet over another window. The sheet contains a small table, and I want the sheet to be sized vertically to show however many rows are required. So just before I show the sheet I update the table and adjust the window's frame. This works fine -- except for the first time the sheet appears, when it always appears with the size set in the nib.
>
> I'm using autolayout, and I'm calling the code to set the window's frame
What are you calling to set the window's frame? I am under the impression that calling setFrame: is not respected when using autolayout.
Sandor Szatmari
> and reload the table's data before showing the sheet (but after calling window to ensure it's loaded). The table is being updated, but not the size. I've also tried setting the frame in the sheet controller's windowDidLoad, but that appears to be too late.
>
> I'm sure I'm missing something simple...
>
> --
> Shane Stanley <email@hidden>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden