Question

I'm trying to create a UIActionSheet similar to Safari's. I haven't been able to find anything in the Apple documentation on how to make a UIActionSheet look like this. Is there a control/API that I am missing that I can use to create what's below, or am I stuck with creating my own UIView and displaying that?

Ninja Edit: This appears to be a UIActivityViewController. Is there any way I can add my own custom actions to it?

ios 7 UIActionSheet

Was it helpful?

Solution 2

About the ninja edit : Yes you can add actions to the UIActivityViewController.

See UIActivity on Apple's doc, or this SO question.

OTHER TIPS

That is not a UIActionSheet.

It is a UIActivityViewController:

https://developer.apple.com/library/ios/documentation/uikit/reference/UIActivityViewController_Class/Reference/Reference.html

From Apple's Documentation:

The UIActivityViewController class is a standard view controller that you can use to offer
various services from your application. The system provides several standard services,  
such as copying items to the pasteboard, posting content to social media sites, sending 
items via email or SMS, and more. Apps can also define custom services.

Your app is responsible for configuring, presenting, and dismissing this view controller.
Configuration for the view controller involves specifying the data objects on which the 
view controller should act. (You can also specify the list of custom services your app 
supports.) When presenting the view controller, you must do so using the appropriate means
for the current device. On iPad, you must present the view controller in a popover. On 
iPhone and iPod touch, you must present it modally.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top