RichTableCellView refresh

6 views
Skip to first unread message

Fabian Jäger

unread,
Jan 17, 2014, 1:15:56 AM1/17/14
to apple-m...@googlegroups.com
Hi all,
is there anybody with experience with RichTableCellView? I swizzled setObjectValue: to add a custom subView (NSImageView) to the TableCellView... I somehow managed to do so, but the position of the NSImageView needs to be adapted to the length of the NSTextField (email sender), but I don't know how to accomplish this. Does anybody have some hints here?

The problem is the following: I would like to add an image next to the other status images (attachment, flag, junk) depending on some criterion for each email.

Best regards,
Fabian

Fabian Jäger

unread,
Jan 17, 2014, 10:55:50 AM1/17/14
to apple-m...@googlegroups.com
To add a little more information here:

The positioning of my additional NSImageView works correctly, but the position is only refreshed when the particular cell is clicked or when the whole list (table) is refreshed. But I would also like to refresh the position when the user scrolls within the list and new cells show up. In these cells the position of the additional NSImageView is not correct and needs a refresh. Is there any method that gets called when a cell-view actually gets visible?

Best regards,
Fabian

Fabian Jäger

unread,
Jan 17, 2014, 10:59:27 AM1/17/14
to apple-m...@googlegroups.com
One more idea/question: I guess that all the subviews in RichTableCellView use NSLayoutConstraints (autolayout) for their positioning. Has anybody found a good way to add a custom view into such an autolayout with corresponding constraints?

Best regards,
Fabian
Reply all
Reply to author
Forward
0 new messages