How to show the share button in Mountain Lion?

后端 未结 3 1883
长发绾君心
长发绾君心 2021-02-03 12:06

Mountain Lion offers a built-in sharing button that reveals a menu of sharing services appropriate for the app:

\"Sh

3条回答
  •  暖寄归人
    2021-02-03 12:22

    Note that if you're trying to add this button via Interface Builder:

    1. Select the button
    2. Switch to Attributes inspector
    3. Delete the button Title
    4. Insert: NSShareTemplate as the Image name.

    It doesn't look right to me in XCode, but works fine when run.

    PS - This appears to be a case where you need to use the System Icon string value (NSShareTemplate) instead of the constant (NSImageNameShareTemplate).

提交回复
热议问题