vertically aligning text in NSTableView row
问题 I have a small problem with NSTableView. When I am increasing height of a row in table, the text in it is aligned at top of row but I want to align it vertically centered! Can anyone suggest me any way to do it ?? Thanks, Miraaj 回答1: This is a simple code solution that shows a subclass you can use to middle align a TextFieldCell. the header #import <Cocoa/Cocoa.h> @interface MiddleAlignedTextFieldCell : NSTextFieldCell { } @end the code @implementation MiddleAlignedTextFieldCell - (NSRect