• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IB keeps changing my constraints when I resize the cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB keeps changing my constraints when I resize the cell


  • Subject: Re: IB keeps changing my constraints when I resize the cell
  • From: Quincey Morris <email@hidden>
  • Date: Sat, 15 Jun 2013 20:00:08 -0700

On Jun 15, 2013, at 19:31 , Rick Mann <email@hidden> wrote:

> There's a setting for "Automatic"…where does it get it from then?

AFAIK, it means the row height is set automatically based on the control size (small/medium/large).

> Also, is there no way, using bindings, and no delegate, to choose among multiple NSTableViewCell implementations? I thought the 2011 WWDC video said it was possible, but I didn't quite understand what it was referring to. Unfortunately, there's no straightforward pure-bindings example to look at.

There's no way within the design-time table view itself. If the table uses bindings and there's no delegate, the column identifier is used to choose the cell view to instantiate, which can be the design-time cell view or a view in its own registered nib, but can't be varied by row.

If you want to choose between cell views by row, you need to put each cell view in its own nib, register each nib with the table view under a unique identifier, then implement the 'tableView/outlineView:viewFor…' delegate method to decide which identifier to use. It's very easy to do -- all it needs is to invoke 'makeViewWithIdentifier…' with a suitable identifier.

BTW, it can be much harder to vary the row height based on the cell view. You'd either need to cache all possible cell view heights in advance, or have a mechanism to calculate the cell view heights before view instantiation, or some combination of the two approaches.

_______________________________________________

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


  • Follow-Ups:
    • Re: IB keeps changing my constraints when I resize the cell
      • From: Rick Mann <email@hidden>
References: 
 >IB keeps changing my constraints when I resize the cell (From: Rick Mann <email@hidden>)
 >Re: IB keeps changing my constraints when I resize the cell (From: Quincey Morris <email@hidden>)
 >Re: IB keeps changing my constraints when I resize the cell (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: IB keeps changing my constraints when I resize the cell
  • Next by Date: Setting NSWindow to be transparent
  • Previous by thread: Re: IB keeps changing my constraints when I resize the cell
  • Next by thread: Re: IB keeps changing my constraints when I resize the cell
  • Index(es):
    • Date
    • Thread