Platforms to show: All Mac Windows Linux Cross-Platform

Back to UIViewControllerMBS class.

UIViewControllerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Mobile Ads MBS iOS Plugin 23.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
The constructor to create a new empty UIViewController.

UIViewControllerMBS.dismissViewController(animated as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Mobile Ads MBS iOS Plugin 23.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Dismisses the view controller that was presented modally by the view controller.

animated: Pass true to animate the transition.

The presenting view controller is responsible for dismissing the view controller it presented. If you call this method on the presented view controller itself, UIKit asks the presenting view controller to handle the dismissal.

If you present several view controllers in succession, thus building a stack of presented view controllers, calling this method on a view controller lower in the stack dismisses its immediate child view controller and all view controllers above that child on the stack. When this happens, only the top-most view is dismissed in an animated fashion; any intermediate view controllers are simply removed from the stack. The top-most view is dismissed using its modal transition style, which may differ from the styles used by other view controllers lower in the stack.

If you want to retain a reference to the view controller's presented view controller, get the value in the presentedViewController property before calling this method.

Xojo may not be happy, if you mess up their controllers!

UIViewControllerMBS.loadView

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Mobile Ads MBS iOS Plugin 23.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Creates the view that the controller manages.

You should never call this method directly. The view controller calls this method when its view property is requested but is currently nil. This method loads or creates a view and assigns it to the view property.

UIViewControllerMBS.presentViewController(ViewController as UIViewControllerMBS, animated as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Mobile Ads MBS iOS Plugin 23.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Presents a view controller modally.

ViewController: The view controller to display over the current view controller’s content.
animated: Pass true to animate the presentation; otherwise, pass false.

In a horizontally regular environment, the view controller is presented in the style specified by the modalPresentationStyle property. In a horizontally compact environment, the view controller is presented full screen by default. If you associate an adaptive delegate with the presentation controller associated with the object in viewControllerToPresent, you can modify the presentation style dynamically.
The object on which you call this method may not always be the one that handles the presentation. Each presentation style has different rules governing its behavior. For example, a full-screen presentation must be made by a view controller that itself covers the entire screen. If the current view controller is unable to fulfill a request, it forwards the request up the view controller hierarchy to its nearest parent, which can then handle or forward the request.
Before displaying the view controller, this method resizes the presented view controller's view based on the presentation style. For most presentation styles, the resulting view is then animated onscreen using the transition style in the modalTransitionStyle property of the presented view controller. For custom presentations, the view is animated onscreen using the presented view controller’s transitioning delegate. For current context presentations, the view may be animated onscreen using the current view controller’s transition style.

Xojo may not be happy, if you mess up their controllers!

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


The biggest plugin in space...