Class

iOSRectangle


Warning

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

Description

The standard rectangle control for iOS.

Methods

Name

Parameters

Returns

Shared

AddConstraint

constraint As iOSLayoutConstraint

AddControl

child As MobileControl

BlurStyles

Control

index As Integer

MobileControl

ControlCount

Integer

Handle

Ptr

Invalidate

RemoveConstraint

constraint As iOSLayoutConstraint

RemoveControl

child As MobileControl

SetEffect

blurStyle As iOSRectangle, vibrancyStyle As iOSRectangle = VibrancyStyles, vibrantContent As MobileContainer = Nil

SetTintColor

value As Color

VibrancyStyles

Events

Name

Parameters

Returns

Close

Open

Property descriptions


iOSRectangle.AccessibilityHint

AccessibilityHint As Text

The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.

Me.AccessibilityHint = "Click to calculate the value and display the next view."

iOSRectangle.AccessibilityLabel

AccessibilityLabel As Text

The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.

Me.AccessibilityLabel = "Calculate the value."

iOSRectangle.BorderColor

BorderColor As Color

The color of the border.


iOSRectangle.BorderWidth

BorderWidth As Double

The width of the border in points.


iOSRectangle.CornerHeight

CornerHeight As Double

The height of the corner in points. Used to create rounded corners.

Round the corners:

Rectangle1.CornerHeight = 25
Rectangle1.CornerWidth = 25

iOSRectangle.CornerWidth

CornerWidth As Double

The width of the corner in points. Used to create rounded corners.

Round the corners:

Rectangle1.CornerHeight = 25
Rectangle1.CornerWidth = 25

iOSRectangle.FillColor

FillColor As Double

The fill color.


iOSRectangle.Height

Height As Double

The height of the control.

This property is read-only.


iOSRectangle.Left

Left As Double

The left position of the control.

This property is read-only.


iOSRectangle.Name

Name As Text

The name of the control. This can only be set in the Inspector. Use the name to refer to the control.

This property is read-only.


iOSRectangle.Parent

Parent As iOSControl

Indicates the control's parent object, if it has one. If there is no parent, this is Nil.

This property is read-only.


iOSRectangle.Top

Top As Double

The top position of the control.

This property is read-only.


iOSRectangle.Visible

Visible As Boolean

Indicates whether the control is visible.

Make a button invisible:

Button1.Visible = False

iOSRectangle.Width

Width As Double

The width of the control.

This property is read-only.

Method descriptions


iOSRectangle.AddConstraint

AddConstraint(constraint As iOSLayoutConstraint)

Adds a constraint to the control. This constraint is used by child controls that have been added to this control.


iOSRectangle.AddControl

AddControl(child As MobileControl)

Adds a child control to the control.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.BlurStyles

BlurStyles

Specifies the type of blur to use with the SetEffect method.


iOSRectangle.Control

Control(index As Integer) As MobileControl

Gets the child control at the specified index.


iOSRectangle.ControlCount

ControlCount As Integer

The number of child controls in the control.


iOSRectangle.Handle

Handle As Ptr

The handle is used to get a reference to the control for interfacing directly with the iOS API.


iOSRectangle.Invalidate

Invalidate

Marks the control so that it will be redrawn during the next event loop.

Call Invalidate to force a Canvas to redraw itself:

Canvas1.Invalidate

iOSRectangle.RemoveConstraint

RemoveConstraint(constraint As iOSLayoutConstraint)

Removes a constraint from the control.


iOSRectangle.RemoveControl

RemoveControl(child As MobileControl)

Removes the control from the control.


iOSRectangle.SetEffect

SetEffect(blurStyle As iOSRectangle, vibrancyStyle As iOSRectangle = VibrancyStyles, vibrantContent As MobileContainer = Nil)

Sets the blur effect for the rectangle.

  • blurStyle as iOSRectangle.BlurStyles - The type of blur. The BlurStyles enum defines 21 different styles, the first 6 work on all supported versions of iOS (10-13) styles 7-21 were introduced with iOS 13 and will only work on those devices.

  • vibrancyStyle as iOSRectangle.VibrancyStyles - Specifies the type of vibrancy you'd like to use with this rectangle. iOS 10-12 support two of the eight styles (Label and Fill) whereas iOS 13 supports all eight styles.

  • vibrancyContent as iOSContainerControl - the content that you'd like to have exhibit vibrancy within the rectangle.

In order for the effect to take place, the background color of the parent view must to be set to clear. For example: ParentRectangle.FillColor = Color.Clear


iOSRectangle.SetTintColor

SetTintColor(value As Color)

Changes a control's tint color. This varies by control and for some controls may not do anything. For example, with an MobileTextField this changes the cursor color.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.


iOSRectangle.VibrancyStyles

VibrancyStyles

Specifies the vibrancy to use with the SetEffect method.

Event descriptions


iOSRectangle.Close

Close

Called when the control is removed from its container, such as a view.


iOSRectangle.Open

Open

Called after the control is created. This is where you typically put initialization code.

Set label text in Open event:

Me.Text = "Hello"

Sample code

Sample Code In the Open event handler, update the rectangle to have thick blue borders, rounded corners and a red fill:

Me.BorderColor = Color.Blue
Me.BorderWidth = 10
Me.CornerHeight = 25
Me.CornerWidth = 25
Me.FillColor = Color.Red

Compatibility

iOS projects on the iOS operating system.