I have a NSStatusItem
in my Cocoa projeсt, targeted on SDK 10.9. I also use NSStatusItem::setView
here to implement semi-custom tray icon. Obviously, setTitle
won't work here, because of custom view applied, that's why a question was born. How can I draw a title string for custom NSView
inside an instance of NSStatusItem
?
Asked
Active
Viewed 322 times
0

Ian P Badtrousers
- 389
- 3
- 12
1 Answers
0
self.button.title = @"MyTitle";
Or… override drawRect in your custom NSView subclass and draw what ever you want to draw.

geowar
- 4,397
- 1
- 28
- 24