NSPopover below caret in NSTextView
问题 I know that in order to show a popover I need an NSView, but I don't think that there is one associated with the caret (inside the NSTextView). Is there a way to show a NSPopover below the caret? I tried to alloc a NSView and position it using (NSRect)boundingRectForGlyphRange:(NSRange)glyphRange inTextContainer:(NSTextContainer *)container , but the popover will not appear (and there's a reason, that method returns NSRect: {{0, 0}, {0, 0}} ). 回答1: I'm not sure if you are still looking for