Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a standard iOS Share button?

The iOS Human Interface Guidelines say:

Use the system-provided Share button. Users are familiar with the meaning and behavior of this button, so it’s a good idea to use it when possible. The main exception to this is if your app does not contain a toolbar or navigation bar[, as] the Share button can only be used in a toolbar or navigation bar.

OK, but how do I “use the system-provided Share button”? A search of the documentation turns up nothing useful.

I've gathered that I should use UIActivityViewController in my response to the button being tapped, but how would I create the standard Share button in the first place?

like image 300
Peter Hosey Avatar asked Nov 01 '13 22:11

Peter Hosey


People also ask

What is the iOS Sharing button?

Apple introduced the share button with iOS 8 in 2014, and the feature lets you share documents, images, and other items between apps, services, and other people.

How do I customize my Share menu on iPhone?

You can customize the menu from the control-click options as follows: Control-click on any file in the Finder, select Share, and click More. You'll see a list of items that you can add and remove from the Share menu. Tick the items that you want to keep in the menu; untick the items you want to remove.

How do you add to Share options on iPhone?

First, open up a photo or other file and tap the share button in the bottom left corner (or elsewhere depending on the file type). Now you will see two rows of options. Scroll all the way to the right on either row until you see the "More" option. Tap on it.

What is iOS Share menu?

If you're an iPhone or iPad user, you're probably aware of the sharing menu in iOS. It gives you access to a lot more options than just being able to send information to different apps or share files with other users.


1 Answers

The standard Share button is a UIBarButtonItem (so it can only go on a navigation bar or toolbar). You need to create a “system item”; specifically, an “action item”. The “action” bar button item is the Share button.

like image 161
Peter Hosey Avatar answered Sep 21 '22 15:09

Peter Hosey