How do I create a standard iOS Share button?

后端 未结 7 549
情话喂你
情话喂你 2020-12-30 19:13

The iOS Human Interface Guidelines say:

Use the system-provided Share button. Users are familiar with the meaning and behavior of thi

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 19:37

    The system-provided Action button can also be fully created with an Interface Builder. To do so just drag & drop the UIToolbar to your view. Than drag & drop the UIBarButtonItem into the UIToolbar. As next step select in the view hierarchy the UIBarButtonItem, go to the Attribute Inspector and select as System Item the "Action". Done!

    Additionally it is possible to connect the UIBarButtonItem with your class as IBOutlet or IBAction.

    Please note: I use as a reference an Xcode 7.

提交回复
热议问题