Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

question from:https://stackoverflow.com/questions/19736440/how-do-i-create-a-standard-ios-share-button

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
265 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...