Platforms to show: All Mac Windows Linux Cross-Platform

/iOS/SharingPanel iOS


Required plugins for this example: MBS MacBase Plugin, MBS MacFrameworks Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /iOS/SharingPanel iOS

This example is the version from Sun, 4th Sep 2021.

Project "SharingPanel iOS.xojo_binary_project"
Class App Inherits MobileApplication
End Class
Class Screen1 Inherits MobileScreen
Control Button1 Inherits MobileButton
ControlInstance Button1 Inherits MobileButton
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
EventHandler Sub Pressed() panel = New MySharingPanelMBS If SwitchURL.Value Then panel.AddURL "https://mbs-plugins.de" End If If SwitchText.Value Then panel.AddText "Hello World, just a test message.", "The subject line" End If If SwitchImage.Value Then Dim pic As Picture = LogoMBS(500) panel.AddPicture pic End If If SwitchPDF.Value Then Dim file As FolderItem = MakePDF panel.AddFile file End If If SwitchImage2.Value Then // you can add multiple items Dim pic As Picture = LogoMBS(500) panel.AddPicture pic End If panel.Present End EventHandler
End Control
Control SwitchURL Inherits MobileSwitch
ControlInstance SwitchURL Inherits MobileSwitch
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control Label1 Inherits MobileLabel
ControlInstance Label1 Inherits MobileLabel
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control SwitchText Inherits MobileSwitch
ControlInstance SwitchText Inherits MobileSwitch
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control Label2 Inherits MobileLabel
ControlInstance Label2 Inherits MobileLabel
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control SwitchImage Inherits MobileSwitch
ControlInstance SwitchImage Inherits MobileSwitch
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control Label3 Inherits MobileLabel
ControlInstance Label3 Inherits MobileLabel
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control SwitchPDF Inherits MobileSwitch
ControlInstance SwitchPDF Inherits MobileSwitch
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control Label4 Inherits MobileLabel
ControlInstance Label4 Inherits MobileLabel
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control SwitchImage2 Inherits MobileSwitch
ControlInstance SwitchImage2 Inherits MobileSwitch
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Control Label5 Inherits MobileLabel
ControlInstance Label5 Inherits MobileLabel
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
End Control
Function MakePDF() As FolderItem // to avoid a dependency to DynaPDF in this example, we use the built-in class Var pdf As New PDFDocument Dim g As Graphics = pdf.Graphics g.Font = New Font("Helvetica", 18) g.DrawText("The quick brown fox", 50, 50) Var f As FolderItem = SpecialFolder.Documents.Child("test.pdf") pdf.Save(f) Return f End Function
Property Panel As MySharingPanelMBS
End Class
Class LaunchScreen Inherits iosView
End Class
Class MySharingPanelMBS Inherits SharingPanelMBS
EventHandler Sub Completed(activityType as String, completed as Boolean, activityError as NSErrorMBS) Dim message As String If completed Then message = "Completed "+activityType Else message = "Cancelled" End If If activityError <> Nil Then message = message + EndOfLine + activityError.LocalizedDescription End If MessageBox message End EventHandler
End Class
End Project

The items on this page are in the following plugins: MBS iOS Plugin.


The biggest plugin in space...