Re: NSTableCellView Constraints?
Re: NSTableCellView Constraints?
- Subject: Re: NSTableCellView Constraints?
- From: Thomas Wetmore <email@hidden>
- Date: Tue, 27 Jan 2015 11:36:34 -0500
> On Jan 27, 2015, at 10:48 AM, Roland King <email@hidden> wrote:
>
>
>> On 27 Jan 2015, at 22:32, Thomas Wetmore <email@hidden> wrote:
>> There must be a constraint problem, and I have been playing around with them for awhile, but no joy yet. Googling has not turned up a similar issue. I would have assumed that when I dragged the NSTableCellView into the NSTableColumn using IB, that IB would have established the constraints between the cell view and the column view properly.
>
> No it probably didn’t, but that’s ok, the tableview knows how to keep the cell the width as the column. It may do it with constraints, or use autoresizing masks.
I would assume this also. But it does not seem to be happening.
>
>> Apparently not. Is this a known Swift/Cocoa bug or IB bug?
>
> None of the above I’d expect. What constraints are there between the text view and the cell which contains it? I don’t remember there being any by default, which means at runtime some would be implicitly added, probably a fixed position and fixed width constraint if you hadn’t added some in yourself.
>
>
Using IB to check the constraints on the NSTextField within the NSTableCellView, IB states: “The selected views have no constraints. At build time, explicit left, top, width, and height constraints will be generated for the view.” If this is true, then the constraints that are generated are preventing the text field from getting wider than the launch time width of the column.
Checking the constraints on the NSTableCellView within the NSTableColumn, IB states: “This view has no constraints.”
As always I am probably doing something stupid possibly obviously stupid. I will reread the Table View Programming guide another time!
Thanks,
Tom Wetmore
_______________________________________________
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