Re: Set the size of a sheet when it's first loaded
On 25 Aug 2016, at 10:22 PM, Sandor Szatmariwrote: > > What are you calling to set the window's frame? I am under the impression > that calling setFrame: is not respected when using autolayout. Thanks -- that's the simple thing I was forgetting. -- Shane Stanley , ___ 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
Re: Set the size of a sheet when it's first loaded
Shane, > On Aug 25, 2016, at 04:28, Shane Stanleywrote: > > 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 > > > > ___ > > 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/admin.szatmari.net%40gmail.com > > This email sent to admin.szatmari@gmail.com ___ 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
Set the size of a sheet when it's first loaded
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 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___ 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