I would like to add a “share” button in my Mac app, like Safari and other apps have in OS X 10.8.
Is it possible to get this icon programmatically from another bundle on runtime? Or should I make a copy of it and include it in my app bundle?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
[NSImage imageNamed:NSImageNameShareTemplate]will give you an NSImage with the default share image. You don’t need to include a copy of the image since it is a system resource (at least, in 10.8. It is a different story if it is 10.7). There is a list of other system provided icons here.You may also want to look up
NSSharingServicePickerif you will be implementing a standard share menu.