• 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: Making custom table cells for view-based tables on mac?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making custom table cells for view-based tables on mac?


  • Subject: Re: Making custom table cells for view-based tables on mac?
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 24 Nov 2015 06:17:25 -0600

On Nov 24, 2015, at 12:08 AM, Quincey Morris <email@hidden> wrote:
>
>> Furthermore, I want my image on the right, not the left, unless there's a HIG reason not to do that? Even if the thumbnails end up being on the left, I want to understand how to change that if I ever wanted to.
>
> The image is going to appear on the left (or perhaps on the right for right-to-left locales). I’m not sure if you can fiddle with this in IB — the eventual placement might be the result of layout decisions in the NSTableCellView class.

NSTableCellView only enforces a layout when its rowSizeStyle is not .Custom.  Other rowSizeStyle values are typically only used for source lists.

Normally, there's no obstacle to rearranging the views within the cell view however you want.

> If IB won’t let you put the image where you want it, you can always go back to the text only cell, and add your own custom image subview.

The only difference between those two ready-made objects in the library are the presence of the image view and the connection from the table cell view's imageView outlet to it.  If the table cell view were doing something you don't want it to, disconnecting the outlet would be the same as starting from a text only cell and adding an image view manually.


>> Once I get my views in place, I'll have to hook them to the view controller, correct? Normally I'd not even ask this, but I had to hook up nothing, and my cell already has a label that's not an outlet, so I'm not sure if special rules apply to cells.
>
> Nope. If you have custom subviews, you need to subclass NSTableCellView to provide outlets to your new subviews, and potentially other behavior. (The standard NSTableCellView may have some programmatic auto-layout behavior involving the two standard subviews.)

Again the programmatic layout is typically only done for source lists.

Regards,
Ken


_______________________________________________

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


References: 
 >Making custom table cells for view-based tables on mac? (From: Alex Hall <email@hidden>)
 >Re: Making custom table cells for view-based tables on mac? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Bunch of CoreData based NSDocument questions.
  • Next by Date: Swift - internal class conforming to public protocol
  • Previous by thread: Re: Making custom table cells for view-based tables on mac?
  • Next by thread: Question about getBytes:length:
  • Index(es):
    • Date
    • Thread