Using share sheets
Our app is coming along nicely, but it is not very useful. The photo is displayed in the form, but goes away when we stop the app or take another photo. It is a typical functionality in mobile operating systems to be able to share things with other installed apps. For example, we might want to share a photo on social media or send it by email. This can be achieved through share sheets that are also available through actions.
The term share sheet refers to the ability of apps to share data with other apps, such as the common use case of sharing an image with a social network application. We can see this in action by extending our existing app from the previous section as follows:
- Drop another
TSpeedButton
on the toolbar. Rename it toSpdbtnSharePhoto
, change itsStyleLookup
property toactiontoolbutton
, adjust its width, and align it toRight
. - Expand its
Action
property in the Object Inspector, and through the context menu, add theTShowShareSheetAction...