Class

iOSSharingPanel


Warning

This item was deprecated in version 2020r2. Please use MobileSharingPanel as a replacement.

Description

An iOSSharingPanel allows the application to share a piece of text, a URL, or a picture with any registered system service or app.

Methods

Name

Parameters

Returns

Shared

SharePicture

pic As Picture, parentView As MobileScreen, parentControl As MobileControl

ShareText

textToShare As String, parentView As MobileScreen, parentControl As MobileControl

ShareURL

url As String, parentView As MobileScreen, parentControl As MobileControl

Events

Name

Parameters

Returns

Cancelled

Completed

Method descriptions


iOSSharingPanel.SharePicture

SharePicture(pic As Picture, parentView As MobileScreen, parentControl As MobileControl)

Displays the sharing panel to the user, allowing them to share the passed picture.

A NilObjectException is raised if pic is Nil.

Share a picture:

MySharingPanel.SharePicture(myPic, Self, Me)

iOSSharingPanel.ShareText

ShareText(textToShare As String, parentView As MobileScreen, parentControl As MobileControl)

Displays the sharing panel to the user, allowing them to share the passed text.

Share text from a Text Area:

MySharingPanel.ShareText(DescArea.Text, Self, Me)

iOSSharingPanel.ShareURL

ShareURL(url As String, parentView As MobileScreen, parentControl As MobileControl)

Displays the sharing panel to the user, allowing them to share the passed URL.

An InvalidArgumentException is raised if the url parameter is not a valid URL construct.

Share a URL:

MySharingPanel.ShareURL("http://www.wikipedia.org", Self, Me)

Event descriptions


iOSSharingPanel.Cancelled

Cancelled

Called when the sharing panel has been cancelled.


iOSSharingPanel.Completed

Completed

Called when a sharing panel has been used.

Notes

By default, Xojo provides a default message that will appear will appear when the user is asked for permission to access their photo library. If you wish to customize this message, look for the NSPhotoLibraryAddUsageDescription key in the plist of your built app.

Compatibility

iOS projects on the iOS operating system.

See also

Object parent class; Picture