Table of Contents

Class IosWebViewController

Namespace
VpnHood.AppHosting.WebView.Ios
Assembly
VpnHood.AppHosting.WebView.Ios.dll

Represents the page's controller on iOS: the iOS chrome around the web UI, its background, status bar and safe area, with the native lifecycle handed to the shared WebViewHost.

public class IosWebViewController : UIViewController, IEquatable<NSObject>, INSObjectProtocol, IUIActivityItemsConfigurationProviding, IUIPasteConfigurationSupporting, IUIResponderStandardEditActions, IUIUserActivityRestoring, IEnumerable, INSCoding, INSExtensionRequestHandling, IUIAppearanceContainer, IUIContentContainer, IUIFocusEnvironment, IUITraitChangeObservable, IUITraitEnvironment, INativeObject, IDisposable
Inheritance
NSObject
UIResponder
UIViewController
IosWebViewController
Implements
IEquatable<NSObject>
INSObjectProtocol
IUIActivityItemsConfigurationProviding
IUIPasteConfigurationSupporting
IUIResponderStandardEditActions
IUIUserActivityRestoring
INSCoding
INSExtensionRequestHandling
IUIAppearanceContainer
IUIContentContainer
IUIFocusEnvironment
IUITraitChangeObservable
IUITraitEnvironment
INativeObject

Remarks

The app must have started with its local web host, which needs the app's web content, as the page comes from it.

Properties

AllowRotation

Gets a value indicating whether the controller asks for every orientation, rather than portrait only, as the web UI is portrait first; the app's and the device's own limits still apply.

public bool AllowRotation { get; init; }

Property Value

bool

Remarks

On an iPad that shares its screen with other apps, the system may not honour the mask.

Methods

Dispose(bool)

Releases the resources used by this object.

protected override void Dispose(bool disposing)

Parameters

disposing bool

If set to true, the method is invoked directly and disposes managed and unmanaged resources. If set to false, the method is called by the garbage collector finalizer and should only release unmanaged resources.

Remarks

This method releases the resources used by this class.

This method is called by both the Foundation.NSObject.Dispose() method and the object finalizer (Foundation.NSObject.~NSObject()). When invoked by the Foundation.NSObject.Dispose() method, the disposing parameter is set to true and any managed object references that this object holds are also disposed or released. When invoked by the object finalizer, on the finalizer thread, the disposing parameter is set to false.

Calling the Foundation.NSObject.Dispose() method when the application is finished using this instance ensures that all external resources used by this managed object are released as soon as possible. Once developers have invoked the Foundation.NSObject.Dispose() method, the object is no longer useful and developers should no longer make any calls to it.

See Also

GetSupportedInterfaceOrientations()

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()

Returns

UIInterfaceOrientationMask

Remarks

Portrait, or every orientation with AllowRotation.

PreferredStatusBarStyle()

public override UIStatusBarStyle PreferredStatusBarStyle()

Returns

UIStatusBarStyle

Remarks

Light content, always, whatever the background.

ViewDidLoad()

public override void ViewDidLoad()

Remarks

It gives the app its UI context, then paints the view and makes the web view once the theme's colours are read.