Class
iOSMessageBox
Warning
This item was deprecated in version 2020r2. Please use MobileMessageBox as a replacement.
Description
Used to asynchronously display alerts.
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
Events
Name |
Parameters |
Returns |
---|---|---|
buttonIndex As Integer |
Property descriptions
iOSMessageBox.Message
Message As Text
A longer message that appears below the title in the message box.
Set the message:
MessageBox1.Message = "Would you like to update this information?"
iOSMessageBox.Title
Title As Text
The title of the message box, which appears at the top.
Set the title:
MessageBox1.Title = "Warning"
Method descriptions
iOSMessageBox.Show
Show
Displays the message box. This is not modal, so your code continues to run. When the user selects a button, the ButtonAction event handler is called.
Displays a message box. HelloMessage is an iOSMessageBox that was dragged onto the View from the Library:
HelloMessage.Title = "Hello"
HelloMessage.Message = "Hello, World!"
HelloMessage.Show ' Not modal, so code does not pause here
Event descriptions
iOSMessageBox.ButtonAction
ButtonAction(buttonIndex As Integer)
Called when the button at buttonIndex (0-based) is selected.
Displays the index of the selected button:
Label1.Text = "You selected button " + buttonIndex.ToText
Notes
Since iOSMessageBox is asynchronous, any code after the Show method is executed after the message box is displayed. Use the ButtonAction event handler to get the results of a button selection and to run code based on the selection. Here are Apple's UI guidelines for the text and buttons in a MessageBox:
Compatibility
iOS projects on the iOS operating system.