I have seen this format (Image shown below) of share option in most of the iOS applications that support iOS 7. Is there a default code/framework available to implement this share option as it is shown in the image below?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
some good example code: How to display the default iOS 6 share action sheet with available share options?
I know this question is particular to iOS 7, and the code example specifies iOS 6, but AFAICT they are very similar one might find the example code as helpful as I did.
The Controller in the image you posted is the UIActivitiyViewController this is a link to the class documentation
In addition to the accepted answer, a small piece of example code
Call
shareText
, leave the things that you don't want to share atnil
.Just use following code for Default Sharing. You can able to add more items into
shareItems
array as per your requirement.Following method is for default sharing Text or Image into other Apps:-
If you want to make Custom Sharing sheet then use following code. For this, you have to import
<Social/Social.h>
framework.Hope, this is what you're looking for. Any concern get back to me. :)
UIActivityViewController
is what you are looking for.You can specify either the items or the applications
What you are looking for is the
UIActivityViewController
.Since you asked a general question I can't do more than give you a link to the documentation