From Xojo Documentation

Revision as of 20:42, 10 August 2018 by PLefebvre (talk | contribs) (Created page with "{{ClassBox | super=iOSControl | project=Mobile | target=iOS | scope=global }} {{Description | text=Used to embed UIViews created via declares into the Xojo control hierarc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Class (inherits from iOSControl)

Used to embed UIViews created via declares into the Xojo control hierarchy.

Close CreateView Open
AccessibilityHint Left fa-lock-32.png Top fa-lock-32.png
AccessibilityLabel Name fa-lock-32.png Visible
Height fa-lock-32.png Parent fa-lock-32.png Width fa-lock-32.png
AddConstraint ControlCount RemoveConstraint
AddControl Handle RemoveControl
Control Invalidate SetTintColor


Each iOSControl has an underlying UIView. The iOSUserControl class lets you hand the framework explicitly what you want it to use for the UIView.

In the CreateView event, you should create and configure whatever UIView you want. If the UIView's initializer requires a frame rectangle, pass in anything arbitrary (it will be placed correctly via auto layout). The UIView should be returned autoreleased and not just the result of alloc+init.

You cannot place an iOSUserControl (from the Library) directly on a layout. Instead you must subclass it, add code to the CreateView event handler and then drag the subclass onto the layout.

See Also