I follow the IT manual from the apple, but it really does not work properly.
Basically, I'm trying to add a hyperlink to an NSTextField in a window through a custom WindowController class. I can make the hyperlink work with several problems:
- When I hit the hyperlink, I get "I bean" (the cursor indicates that you can select the text). I need a hand that usually appears above hyperlinks
- When I click on hyperlinks, it opens the link in my browser successfully, but then it changes the size and format of the text (for example, it is no longer centered, but back by default). Now that I am hanging over him, I get a hand.
After a little experiment, I found that the initial formatting of the string (for example, size, font before I click on it) is the .xib file into which I created the shortcut. After I click, it will change to some by default, which I can not influence in any way. However, the hyperlink remains.
Here are some of the code:
AboutWindowController.h
AboutWindowController.h
.xib is very simple: this is a window with a label in it, and I linked the label to the .h file correctly (I suppose)
Thanks for the help. I will try to regularly check the answers to any questions / clarifications. EDIT: Please check out my comment on the Bikram response to update my situation.
source share