Set the placeholder string for NSTextView
问题 Is there any way to set the placeholder string for NSTextView like that in NSTextField ? I have checked the property but couldn't find it. I have searched some questions but there isn't a proper explanation. 回答1: I found this answer online. Philippe Mougin made this. static NSAttributedString *placeHolderString; @implementation TextViewWithPlaceHolder +(void)initialize { static BOOL initialized = NO; if (!initialized) { NSColor *txtColor = [NSColor grayColor]; NSDictionary *txtDict =