Adding the sharing panel to your app

The Sharing Panel allows the app to share text, a URL, or a picture with any registered iOS system service or app.

This control does not have user interface that displays on the layout so it appears in the Shelf when dragged to the layout.

../../../_images/adding_the_sharing_panel_to_your_app_ios_tutorial_mobile_sharing_panel_icon.png

Below is a list of commonly used events, properties and methods. Refer to MobileSharingPanel for details on its events and methods.

Events

Cancelled - Called if the user cancels the sharing operation.

Completed - Called when the sharing operation is completed.

Methods

SharePicture - Shares a picture. You need to provide the picture, the parent screen and parent control.

ShareText - Shares text. You need to provide the text, the parent screen and parent control.

ShareURL - Share a URL. You need to provide the URL, the parent screen and parent control.

Usage

This code on a button's Pressed event handler shares text:

SharingPanel1.ShareText("Hello world!", Self, Me)
../../../_images/adding_the_sharing_panel_to_your_app_ios_generic_sharing_panel.png

If you use the SharePicture method, you will need to enable the Photos Access option. In the Navigator, click on iOS under Build Settings then in the Inspector's Advanced tab, enable Photo Access.

See also

MobileSharingPanel class