iOS Guides | Samples

UIKit.UIView Class

Base class used for components that want to render themselves and respond to events.

See Also: UIView

Syntax

Remarks

The UIView class is a rectangular area on the screen that is responsible for displaying content and handling user interactions with that content. It can also contain other views, allowing you to create complex interactive controls. UIView can thus be used as either a standalone control, or a full screen of content built from many other independent UIViews.

Views have three major responsibilities:

  • Visualization: UIView instances are responsible for displaying their content, typically this is done by implementing a draw method using either CoreGraphics, OpenGL or customizing some of their visual properties. Views also have built-in support for animating elements of the view.
  • Managing Layout and Subviews: UIViews are responsible for managing their layout in response to changes in size and orientation. This includes re-drawing any content they manage, as well as repositioning children views. This is most often in response to size of the UIView. For instance, if a view represents a button, the location of corners would change according to size. Or, if the device was rotated, the view might get resized (or it might resize it's child views).
  • Event Handling: UIViews are a natural place to handle touch events since they are self-contained user interface elements. UIViews subclass the UIResponder class, so they participate both on system events (like motion and actions) as well as being able to process touch events.

Event Handling

UIViews can handle touch events in two ways. You can use the high-level gesture recognizer API to detect and handle gestures, or you can roll your own event handling by using the low-level interface that provides detailed touch events as they happen: every time a finger touches the screen or is lifted as well as motion of those fingers. Both are covered below

When your UIView wants to respond to user input by updating its display, it should call the UIView.SetNeedsDisplay or UIView.SetNeedsDisplayInRect(CGRect) which will queue a call to your UIView.Draw(CGRect) method where you would re-render your control with the new state.

Event delivery can be turned off either by setting the UIView.UserInteractionEnabled to false or you can disable them temporarily at the application level by calling UIApplication.BeginIgnoringInteractionEvents. In both cases, events destined for the view are dropped and are not delivered to the views.

Events are disabled while animation are playing back. You can change this behavior when using explicit animations by using the UIViewAnimationOptions's AllowUserInteraction flag in your animation.

Event Handling with Gesture Recognizers

Interacting with touch interfaces has lead to a series of common gesture idioms that are used everywhere. Gestures like swiping, panning, long-presses, pinching rotating and tapping. iOS makes the process of detecting these common gesture idioms very easy by providing Gesture Recognizers. These are objects that inherit from the UIGestureRecognizer class and can detect various standard gesture idioms. The built-in recognizers include:

In addition, you can create your own custom gesture recognizer by subclassing UIGestureRecognizer.

To use the recognizer, you need to create an instance of the specific kind of recognizer that you need, optionally set some parameters and then you add it to the view by calling AddGestureRecognizer. It is possible to attach multiple gesture recognizers to a single view.

For example, the following code create a gesture recognizer that detects a panning gesture and assigns it to myView:

C# Example

var recognizer = new UIPanGestureRecognizer ((g) => {
  Console.WriteLine ("Panning detected");
  Console.WriteLine ("Gesture recognizer state: {0}", g.State);
});

myView.AddGestureRecognizer (recognizer);

The parameter passed to your lambda (in this case the "g" parameter) is an instance of the gesture recognizer that detected the gesture. You can query the parameters of the recognized query by looking at the properties in the recognizer, the UIGestureRecognizer.State property contains the recognizer state.

Event Handling with method Overrides

Although Gesture Recognizers provide a high-level and convenient way of capturing many touch events, they do not cover every possibility. For those cases, developers should subclass UIView and override one or more of the following methods inherited from UIResponder:

UIViews by default only handle a single touch event at once. If you want your view to handle multiple touches, you must set the UIView.MultipleTouchEnabled to true.

iOS creates a T:UIKit.UIEvent object any time a finger touches the screen, moves or is removed from the screen. The UIEvent encapsulates all of the touches that are taking place on the screen at this point, even those that do not belong to this view. In addition to the UIEvent, there is an NSSet containing UITouch objects that represent the state of each finger on the screen for this particular view.

If your application handles touches directly, you might want to override the UIView.GestureRecognizerShouldBegin(UIGestureRecognizer) method to control whether an associated UIGestureRecognizer should execute or not.

Creating Views

UIViews are typically created by invoking the constructor that takes a frame as its parameter (the frame is of type RectangleF), for example:

C# Example

var myView = new UIView (new RectangleF (0, 0, 100, 100));

Most subclasses of UIView will provide a constructor that takes the initial frame, just like UIView. For more information on how to do this for your own subclasses, see the section below on subclassing UIView.

You will want to configure your view at this point. One of the most important properties to configure is the UIView.AutoresizingMask which determines how the view will be resized if you invoke UIView.SetNeedsLayout or if the geometry of the view container changes (for example, in response to a device rotation).

Once you have created a view, you will add it to a container view. For your main screen this could be a UIWindow or it could be the UIViewController.View property of your current UIViewController, this is done using one of the following methods:

Although you can use the above APIs to add subviews to any UIView, Apple advises developers against extending existing high-level views by adding subviews to them behind their back. Instead developers should use the public API those high-level views expose.

Bounds and Sizes

Each view is created with an initial UIView.Frame. The Frame is a RectangleF structure that represents both the size and the initial position for the view. The coordinates for the Frame are used to specify the position relative to its superview.

You can resize and move views around using the frame. Every time you set the frame the view will layout its subviews. If you are purely moving the view, using frame can cause performance issues, as it relays out the view and all its subviews.

The UIView.Bounds is the usable frame of the view. Unlike the UIView.Frame, the UIView.Bounds do not use the container's coordinate space, but instead represent the size in the view's own coordinate space. By default the UIView.Bounds location is (0,0).

When you update the UIView.Bounds property, it will modify the UIView.Frame based on the value of the UIView.Center. You can also change the position of your view by updating the UIView.Center property.

When the UIView.Bound property is changed, the size of the view is affected relative to the UIView.Center property.

Animation

There are two styles of animations supported by UIViews, implicit animations and explicit animations.

Implicit animations happen automatically when you modify the UIView.Frame, UIView.Bounds, UIView.Center, UIView.Transform, UIView.Alpha, UIView.BackgroundColor or UIView.ContentStretch properties in a view. The system will automatically animate the change using the system defaults. When you modify any of these animatable properties in the view, iOS automatically creates an animation transaction which starts as soon as control returns to the main loop.

For example, the following code will animate a view's UIView.Bounds and UIView.Center

C# Example

view.Bounds = new RectangleF (0, 0, 100, 100);
view.Center = new PointF (200, 200);

Alternatively, you can create animations explicitly by calling the UIView.BeginAnimations(string) method, configuring the animation, making the changes to the animatable properties and then completing the transaction by calling UIView.CommitAnimations.

Once you call UIView.BeginAnimations(string), you can call these methods to configure the animation:

The following example shows how to use these methods in a transaction:

C# Example

UIView.BeginAnimations (null);
UIView.SetAnimationDuration (5);
UIView.SetAnimationCurve (UIViewAnimationCurve.EaseOut);
view.Bounds = new RectangleF (0, 0, 100, 100);
view.Position = new PointF (200, 200);
UIView.CommitAnimations ();

An alternative to create the transactions and set the configuration options is to use the new UIView.Animate collection of methods that allow you to specify in a single call the delay, the duration, the animation block and an action to be invoked when the animation completes:

C# Example

UIView.Animate (duration, delay, UIViewAnimationOption.Autoreverse,
  delegate {
      view.Bounds = new RectangleF (0, 0, 100, 100);
      view.Position = new PointF (200, 200);
   },
   delegate {
       Console.WriteLine ("Animation completed");
   }
);

The above is the basic set of animations supported by UIViews. If you want finer control over animations you can resort to animations done directly using CoreAnimation. CoreAnimation allows you to animate layers and properties of your C# objects.

Threading

UIView methods are not thread safe, so you should avoid configuring or invoking any of the UIView static methods from any thread that is not the main thread. Newer versions of MonoTouch catch these mistakes in Debug builds by throwing an exception. See the UIApplication.CheckForIllegalCrossThreadCalls for more information.

If you want to perform some work in a background thread that must update any of the UIView properties or you want to invoke any of the UIView static methods, you should use either the NSObject.BeginInvokeOnMainThread or NSObject.InvokeOnMainThread methods. Both methods take a C# delegate or lambda that is invoked on the main thread.

The NSObject.InvokeOnMainThread method will invoke the specified delegate method synchronously on the main thread. The NSObject.BeginInvokeOnMainThread will queue the action to be executed on the main thread.

Example:

C# Example

//
// This performs an expensive computation in the background, and then
// updates the main UI when done.
//
void DoSomeWork (UIView view)
{
  double sum = 0;
  for (int i = 0; i < Int32.MaxValue; i++)
      sum += i * i;

  // Now invoke the update on the main UI.
  view.BeginInvokeOnMainThread (delegate {
      view.BackgroundColor = UIColor.Green;
      statusLabel.Text = "Sum is: " + sum;
  });
}

The following example shows a helper method that can be used to run the provided action on the main thread. It optimizes for the case where you are calling this from the main thread already, and avoids a trip to the main loop pump:

C# Example

static NSObject Invoker = new NSObject();
public static void EnsureInvokedOnMainThread (Action action)
{
    if (NSThread.Current.IsMainThread) {
        action ();
        return;
    }
    Invoker.BeginInvokeOnMainThread (() => action());
}

How to Subclass UIView

Developers will often subclass UIView to provide their own custom views to use. This section discusses the different classes of members that developers would overwrite to create their custom classes.

Initialization

Your subclass of UIView should chain into either the UIView constructor that is initialized with an initial frame (UIView.UIView(RectangleF)). You would typically do this like this:

C# Example

public class MyView : UIView {
    public MyView (RectangleF frame) : base (frame)
    {
        // Your initialization code goes here
    }
}

If your object will be deserialized from an archive produced by the UI designer, you would need to chain to the UIView.UIView(NSCoder) constructor and also flag the constructor as being the one implementing the selector "initWithCoder:", like this:

C# Example

public class MyView : UIView {
    [Export ("initWithCoder:")]
    public MyView (NSCoder coder) : base (coder)
    {
        // Your initialization code goes here
    }
}

By default UIViews will use a CALayer instance for their backing store. The section on "Changing the CALayer" below has both information on how to make this change and a sample.

If your view will contains any other subviews, you should initialize those values in your constructor.

Custom Drawing

To implement custom drawing code in a view, you can subclass the UIView and override the UIView.Draw(CGRect) method. The drawing code placed in the Draw method can use CoreGraphics to draw with. The steps to draw with Core Graphics are:

  • Obtain a reference to the current graphics context.
  • Set up any desired drawing attributes, such as fill and stroke colors for instance.
  • Create geometry from Core Graphics primitives.
  • Draw the geometry.

For example, the following code shows an implementation of an overridden Draw method that draws a triangle:

C# Example

public override void Draw (RectangleF rect)
{
    base.Draw (rect);

    var context = UIGraphics.GetCurrentContext ();

    context.SetLineWidth(4);
    UIColor.Red.SetFill ();
    UIColor.Blue.SetStroke ();

    var path = new CGPath ();

    path.AddLines(new PointF[]{
        new PointF(100,200),
        new PointF(160,100), 
        new PointF(220,200)
    });

    path.CloseSubpath();

    context.AddPath(path);		
    context.DrawPath(CGPathDrawingMode.FillStroke);
}

The UIView.Draw method should never be called directly. It is called by iOS during run loop processing. The first time through the run loop, it is called. After that, it will be called on demand whenever the view has been marked as needing display by calling UIView.SetNeedsDisplay or UIView.SetNeedsDisplayInRect(CGRect).

Core Graphics uses device independent points rather than pixels. This allows drawing code to scale between different resolutions. For example, on a Retina display, 1 point is equivalent to 2 pixels, while on non-Retina displays, 1 point corresponds to 1 pixel.

Printing

UIViews can be printed. The default behavior is for the contents of the UIView as rendered by the UIView.Draw(CGRect) method to be printed.

If you need to provide a different rendering for the view when printed, you should override the UIView.DrawRect(CGRect,UIViewPrintFormatter) method.

Constraints

If you want your view subclass to use the new constraint-based layout system introduced with iOS 6.0, your subclass needs to respond to the requiresConstraintBasedLayout selector, like this:

C# Example

class MyView : UIView {
    [Export ("requiresConstraintBasedLayout")]
    bool UseNewLayout ()
    {
        return true;
    }
}

If your view will use constraints among its own subviews to lay them out, you should override the P:UIKit.UIView.UpdateConstraints which is called before the constraints-based layout is performed.

Constraints-based layout is performed on the alignment rectangle instead of the view's UIView.Frame. The alignment rectangle by default is computed as the UIView.Frame modified by the UIView.AlignmentRectInsets. You can change that behavior and provide your own alignment rectangle by overriding the UIView.AlignmentRectForFrame(CGRect) and UIView.FrameForAlignmentRect(CGRect) methods.

Layout

The default layout system for UIViews is very simple. UIViews are created with an initial UIView.Frame and an UIView.AutoresizingMask that determines how the view will be resized in response to changes in the container's boundaries.

You should set the default UIView.AutoresizingMask property after initialization.

If your view will be a container for other views, you should configure their UIView.AutoresizingMask property. If the layout behavior provided is not sufficient, you should override the UIView.LayoutSubviews method. This method is responsible for updating the UIView.Frame property of each of the subviews.

If the state of your view changes in response to some API calls, instead of changing the layout manually in response to the change, you should invoke the UIView.SetNeedsLayout method which will flag the view for a layout. The layout event will then be processed the next time the main loop runs. By using this approach, you can coalesce multiple changes to the layout in a single pass.

UIViews can implement the UIView.SizeThatFits(CGSize) method to report back what is their desired size based on the contents of the view.

You can override the UIView.SubviewAdded(UIView) and the UIView.WillRemoveSubview(UIView) to track when subviews are added or removed to your UIView.

You can override the UIView.WillMoveToWindow(UIWindow) and the UIView.MovedToWindow to track when your view is moved from one UIWindow to another.

You can override the UIView.WillMoveToSuperview(UIView) and the UIView.MovedToSuperview to track when your view is added or removed from a superview.

Constraints Based Layout

Starting with iOS 6.0 there is a new layout system available to developers, the constraints-based layout system. This system differs from the traditional layout system in that it uses rules (constraints) that describe the relationships between subviews that should be preserved. When views change in size (for example a label is updated) or the size of the container changes (for example, after a rotation), the new positions and sizes for the subviews are computed based on these constraints.

To opt into this system, a subclass of UIView should expose a static method that is exported as "requiresConstraintBasedLayout" and returns true, like this:

C# Example

class MyView : UIView {
    [Export ("requiresConstraintBasedLayout")]
    static bool RequiresConstraintBasedLayout ()
    {
        return true;
    }
}

Event Handling

When using gesture recognizers, developers can add those directly to the constructor at initialization time.

For the low-level touch event handling, you should override the UIResponder.TouchesBegan(NSSet,UIEvent), UIResponder.TouchesMoved(NSSet,UIEvent), UIResponder.TouchesEnded(NSSet,UIEvent) and UIResponder.TouchesCancelled(NSSet,UIEvent) methods.

Since iOS 9.0, UIResponder.TouchesMoved(NSSet,UIEvent) events are raised on supported hardware and configurations for changes in user-applied pressure. The UITouch.Force property of the UITouch object in the touches set argument contains the magnitude of the touch that raised the event. The following example shows a basic use:

c# Example

if (TraitCollection.ForceTouchCapability == UIForceTouchCapability.Available) {
    UITouch t = touches.AnyObject as UITouch;
    ForceLabel.Text = "Force: " + t.Force.ToString ();
}
else {
    ForceLabel.Text = "Force Not Active";
}

Application developers do not need to call the base methods for any of the above methods if they are overriding UIView directly. But they should call base when deriving from another UIView subclass.

Application developers can control whether a gesture recognizer is activated by overriding the UIView.GestureRecognizerShouldBegin(UIGestureRecognizer) method.

Views and CALayers

Each UIView is backed by a CoreAnimation Layer (CALayer). A CALayer represents the GPU-backed bitmap that is used to render the view into the screen. Painting into a UIView actually paints into the CALayer.

While the appearance of a UIView can be controlled by setting its UIView.Frame, UIView.Alpha, UIView.BackgroundColor, or by overriding its UIView.Draw method, all those properties and functions are in fact modifying the CoreAnimation.CALayer owned by the view.

The UIView.Layer property is a reference to the CALayer owned by the view. You can change the appearance of the view by modifying the properties of that layer.

For example, you can add rounded corners to the UIView by modifying the CALayer.CornerRadius of its layer:

C# Example

view.Layer.CornerRadius = 4;

You can add drop shadows by modifying a variety of properties:

C# Example

view.Layer.ShadowColor = new CGColor (1, 0, 0);
view.Layer.ShadowOpacity = 1.0f;
view.Layer.ShadowOffset = new SizeF (0, 4);

You can even apply a 3D transformation to the layer:

C# Example

view.Layer.Transform = CATransform3D.MakeRotation ((float)(Math.PI / 2), 1, 1, 1);

Note that this transformation is a full 3D transform, with a perspective element, that is more versatile than UIView's 2D Transform property. If you apply 3D transforms, you should no longer use the Frame property

Changing the CALayer

The UIView.Layer owned by a view is automatically created and assigned to the view by UIKit and it defaults to be a CALayer instance. You can control the type of layer that is created for a view by responding to the "layerClass" selector in a static method.

Here is an example of a UIView subclass that uses a custom CALayer to do its drawing. This layer, and therefore the view, always displays the color blue:

C# Example

public class BlueView : UIView
{
    [Export ("layerClass")]
    public static Class GetLayerClass ()
    {
        return new Class (typeof (BlueLayer));
    }

    public override void Draw (RectangleF rect)
    {
        // Do nothing, the Layer will do all the drawing
    }
}

public class BlueLayer : CALayer
{
    public override void DrawInContext (CGContext ctx)
    {
        ctx.SetFillColor (0, 0, 1, 1);
        ctx.FillRect (Bounds);
    }
}

In this example, a new UIView class called "BlueView" is created. It exports a static method called "GetLayerClass" that tells UIKit the type of layer that this view wishes to own. In this example, the BlueView wishes to own a BlueLayer.

It is now up to the BlueLayer to provide the visual representation of the view. It does this by executing CoreGraphics drawing code in its CALayer.DrawInContext(CGContext) method. This method is very similar to a UIView's Draw method but is used to fill the layer.

Even though the BlueLayer will do all drawing for the BlueView, the view must still override its Draw method. This override should do nothing and is just a signal to UIKit that the Layer will do all the work.

Motion Effects

Motion Effects are a family of effects that can be applied to UIViews in response to external events, typically the device tilt.

You can tie to motion effects the same properties that are animatable already. UIKit ships with UIInterpolatingMotionEffect which allows you to controls a single property in response to a device tilt.

One you create an effect, you can attach it to a view by calling the UIView.AddMotionEffect method and remove it by calling UIView.RemoveMotionEffect method. The UIView.MotionEffects property can also be used to query or set a number of motion effects at once.

You can also create your own motion effects by subclassing the UIMotionEffect.

Tint Color

Starting with iOS 7, the UIView.TintColor property will now propagate to subviews. This allows applications to set a global tint color, and the color will be passed down to subviews for views that matter. Some UIViews will respond specially based on the TintColor. You should also set the UIView.TintAdjustmentMode to control the desaturation when some views are no longer active.

View Hierarchies

iOS user interfaces are built from UIView hierarchies. Parent-child relationships determine not only the visual aspects of the UI, but determine how the application responds to touch events and orientation changes.

View relationships may be built programmatically or via XIB files. UIViews may have many UIView.Subviews but only one UIView.Superview.

The most common way to add subviews is to use UIView.AddSubview, which appends the child view to the list of UIView.Subviews. More precise control of ordering during insertion may be done with the UIView.InsertSubview, UIView.InsertSubviewAbove, and UIView.InsertSubviewBelow methods.

The ordering of UIView.Subviews may be manipulated with the UIView.BringSubviewToFront, UIView.SendSubviewToBack, and UIView.ExchangeSubview methods.

Focus

On handheld iOS devices, the user interacts directly with screen objects. On tvOS, a remote is used to navigate through the elements on the screen and only one UIView has "focus." Focus-related APIs include:

In addition to UIView.CanBeFocused returning true, for a UIView to be focused, it must have a UIView.Hidden value of false, a UIView.UserInteractionEnabled value of true, a UIView.Alpha value greater than 0, and it must not be obscured by another UIView.

Related content

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of UIKit.UIView are listed below.

See Also: UIResponder

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
Initializes the UIView with the specified frame.
A constructor that initializes the object from the data stored in the unarchiver object.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

AccessibilityActivationPointCGPoint. The screen coordinates for the accessibility element.
AccessibilityElementsHiddenBoolean. Whether the view's accessibility elements are visible.
AccessibilityFrameCGRect. The Frame of the accessibility element, in screen coordinates.
AccessibilityHintString. A brief description of the action performed by the accessibility element.
AccessibilityIdentifierString. Uniquely identifies this for the purposes of accessibility.
AccessibilityLabelString. A localized identifier for the accessibility element.
AccessibilityLanguageString. The BCP 47 language tag of the language used to speak the accessibility element's components.
AccessibilityNavigationStyleUIAccessibilityNavigationStyle. Gets or sets the navigation style.
AccessibilityPathUIBezierPath. Allows the accessibility element to be non-rectangular.
AccessibilityTraitsUIAccessibilityTrait. A bitmask of the UIAccessibilityTraits of this.
AccessibilityValueString. The value of the accessibility element.
AccessibilityViewIsModalBoolean. Whether Voice Over should ignore sibling elements.
[read-only]
AlignmentRectInsetsUIEdgeInsets. Adjustments to the UIView.Frame for use with Auto Layout.
Alphanfloat. Controls the transparency (alpha) value for the view.
static
AnimationsEnabledBoolean. Specifies whether animations are displayed or not.
[read-only]
static
AnnouncementDidFinishNotificationNSString. Notification constant for AnnouncementDidFinish
[read-only]
static
AnnouncementNotificationInt32. An accessibility notification that an announcement will happen.
[read-only]
static
AppearanceUIView+UIViewAppearance. Strongly-typed property that returns the UIAppearance class for this class.
[read-only]
static
AssistiveTechnologyKeyNSString. The string "UIAccessibilityAssistiveTechnologyKey" which can be used to distinguish accessibility notifications.
[read-only]
static
AssistiveTouchStatusDidChangeNotificationNSString. Notification constant for AssistiveTouchStatusDidChange
AutoresizingMaskUIViewAutoresizing. A bitmask that specifies how the receiver should resize itself when it's super-view's bounds change.
AutosizesSubviewsBoolean. Specifies whether the receiver should automatically resize its UIView.Subviews when the receiver's UIView.Bounds change.
BackgroundColorUIColor. Sets the background color of the UIView.
[read-only]
static
BoldTextStatusDidChangeNotificationNSString. Notification constant for BoldTextStatusDidChange
[read-only]
BottomAnchorNSLayoutYAxisAnchor. The NSLayoutYAxisAnchor that defines the bottom of this UIView.
BoundsCGRect. The usable frame of the view, specified using the view's own coordinate system.
[read-only]
CanBecomeFocusedBoolean. Whether this UIView can become the focused view.
CenterCGPoint. The center of the view, in the container coordinate space.
[read-only]
CenterXAnchorNSLayoutXAxisAnchor. The NSLayoutXAxisAnchor that defines the X-axis center of this UIView.
[read-only]
CenterYAnchorNSLayoutYAxisAnchor. The NSLayoutYAxisAnchor that defines the Y-axis center of this UIView.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
ClearsContextBeforeDrawingBoolean. Specifies that the drawing buffer be erased prior to calling UIView.DrawRect
ClipsToBoundsBoolean. Specifies whether the UIView.Subviews are confined to the UIView.Bounds of the receiver.
[read-only]
static
ClosedCaptioningStatusDidChangeNotificationNSString. Notification constant for ClosedCaptioningStatusDidChange
[read-only]
CollisionBoundingPathUIBezierPath. Gets the UIBezierPath to be used for collision detection.
[read-only]
CollisionBoundsTypeUIDynamicItemCollisionBoundsType. Gets the UIDynamicItemCollisionBoundsType describing the type of bounds used for collision detected.
[read-only]
ConstraintsNSLayoutConstraint[]. The constraints used by Auto Layout on this UIView.
ContentModeUIViewContentMode. Controls how the cached bitmap of a view must be rendered when the view's bounds change.
ContentScaleFactornfloat. The number of device pixels per logical coordinate point.
ContentStretchCGRect. Defines an area of the view that is intended to be stretchable.
[read-only]
static
DarkerSystemColorsStatusDidChangeNotificationNSString. Notification constant for DarkerSystemColorsStatusDidChange
[read-only]
EffectiveUserInterfaceLayoutDirectionUIUserInterfaceLayoutDirection. Gets the layout direction for arranging the view's contents.
[read-only]
static
ElementFocusedNotificationNSString. Notification constant for ElementFocused
ExclusiveTouchBoolean. Restricts the event delivery to this view.
[read-only]
FirstBaselineAnchorNSLayoutYAxisAnchor. A NSLayoutYAxisAnchor that defines a constraint based on the baseline of the first line of text in this UIView.
[read-only]
FocusedBoolean. Whether the UIView is the focused view.
[read-only]
static
FocusedElementKeyNSString. A string constant used by accessibility APIs (see UIAccessibility.FocusedElement) to identify the focused element.
FrameCGRect. Coordinates of the view relative to its container.
GestureRecognizersUIGestureRecognizer[]. The array of UIGestureRecognizers for this UIView.
[read-only]
static
GrayscaleStatusDidChangeNotificationNSString. Notification constant for GrayscaleStatusDidChange
[read-only]
static
GuidedAccessStatusDidChangeNotificationNSString. Notification constant for GuidedAccessStatusDidChange
[read-only]
HasAmbiguousLayoutBoolean. Returns true if the Auto Layout for this UIView is ambiguous.
[read-only]
static
HearingDevicePairedEarDidChangeNotificationNSString. Notification constant for HearingDevicePairedEarDidChange
[read-only]
HeightAnchorNSLayoutDimension. The NSLayoutDimenion that defines the height of this UIView.
HiddenBoolean. Specifies whether the UIView displays or not.
[read-only]
static
InheritedAnimationDurationDouble. Static method that returns the currently-active animation's duration, in seconds.
[read-only]
IntrinsicContentSizeCGSize. The size of the intrinsic content of the UIView.
[read-only]
static
InvertColorsStatusDidChangeNotificationNSString. Notification constant for InvertColorsStatusDidChange
IsAccessibilityElementBoolean. Whether this is an accessibility element.
[read-only]
LastBaselineAnchorNSLayoutYAxisAnchor. A NSLayoutYAxisAnchor that defines a constraint based on the baseline of the first line of text in this UIView.
[read-only]
LayerCALayer. The Core Animation layer used for rendering.
[read-only]
static
LayoutChangedNotificationInt32. An accessibility notification indicating that the layout has changed.
[read-only]
LayoutGuidesUILayoutGuide[]. The UILayoutGuide objects defined for this UIView.
LayoutMarginsUIEdgeInsets. Lays out margins.
[read-only]
LayoutMarginsGuideUILayoutGuide. Defines the margin attributes.
[read-only]
LeadingAnchorNSLayoutXAxisAnchor. The NSLayoutXAxisAnchor that defines the leading edge of this UIView.
[read-only]
LeftAnchorNSLayoutXAxisAnchor. The NSLayoutXAxisAnchor that defines the left edge of this UIView.
MaskViewUIView. Returns mask view.
[read-only]
static
MonoAudioStatusDidChangeNotificationNSString. Notification constant for MonoAudioStatusDidChange
MotionEffectsUIMotionEffect[]. Current set of motion effects on this view.
MultipleTouchEnabledBoolean. Controls whether the UIView can handle multitouch events.
[read-only]
static
NoIntrinsicMetricnfloat. Represents the value associated with the constant UIViewNoIntrinsicMetric
[read-only]
static
NotificationSwitchControlIdentifierNSString. Notification constant for NotificationSwitchContr
[read-only]
static
NotificationVoiceOverIdentifierNSString. Notification constant for NotificationVoiceOv
OpaqueBoolean. Determines whether the view is opaque or not.
[read-only]
static
PageScrolledNotificationInt32. An accessibility notification indicating that the page has scrolled.
[read-only]
static
PauseAssistiveTechnologyNotificationInt32. Pauses assistive technology notifications.
[read-only]
PreferredFocusedViewUIView. Returns the UIView that should actually be focused.
[read-only]
PreferredFocusEnvironmentsIUIFocusEnvironment[]. An array of IUIFocusEnvironments that are recursively searched by the system to find the default focused view.
PreservesSuperviewLayoutMarginsBoolean. Preserves layout margins for superview.
[read-only]
ReadableContentGuideUILayoutGuide. An area that can be read by the user with minimal head moving.
[read-only]
static
ReduceMotionStatusDidChangeNotificationNSString. Notification constant for ReduceMotionStatusDidChange
[read-only]
static
ReduceTransparencyStatusDidChangeNotificationNSString. Notification constant for ReduceTransparencyStatusDidChange
RestorationIdentifierString. If not null, indicates that the UIView supports state preservation and restoration.
[read-only]
static
ResumeAssistiveTechnologyNotificationInt32. Resumes assistive technology notifications.
[read-only]
RightAnchorNSLayoutXAxisAnchor. The NSLayoutXAxisAnchor that defines the right edge of this UIView.
[read-only]
static
ScreenChangedNotificationInt32. An accessibility notification that the screen has changed.
SemanticContentAttributeUISemanticContentAttribute. Specifies whether the UIView should maintain it's layour or flip when used with a right-to-left layout.
[read-only]
static
ShakeToUndoDidChangeNotificationNSString. Notification constant for ShakeToUndoDidChange
ShouldGroupAccessibilityChildrenBoolean. Whether the UIView's children should be grouped for the purposes of voice-over, regardless of their position on the screen.
[read-only]
static
SpeakScreenStatusDidChangeNotificationNSString. Notification constant for SpeakScreenStatusDidChange
[read-only]
static
SpeakSelectionStatusDidChangeNotificationNSString. Notification constant for SpeakSelectionStatusDidChange
[read-only]
static
SpeechAttributeLanguageNSString. Retrieves the language used during voice-over.
[read-only]
static
SpeechAttributePitchNSString. Retrieves the pitch used by voice-over.
[read-only]
static
SpeechAttributePunctuationNSString. Whether punctuation is being pronounced by voice-over.
[read-only]
SubviewsUIView[]. An array of UIViews that are contained within this UIView.
[read-only]
SuperviewUIView. The UIView, if any, that contains this UIView in its UIView.Subviews.
[read-only]
static
SwitchControlStatusDidChangeNotificationNSString. Notification constant for SwitchControlStatusDidChange
Tagnint. An integer that can be used to identify a specific UIView instance.
TintAdjustmentModeUIViewTintAdjustmentMode. The tint adjustment applied to this UIView or one of its parent views.
TintColorUIColor. A highlight color which should be used to indicate interactive controls.
[read-only]
TopAnchorNSLayoutYAxisAnchor. The NSLayoutYAxisAnchor that defines the top of this UIView.
[read-only]
TrailingAnchorNSLayoutXAxisAnchor. The NSLayoutXAxisAnchor that defines the leading edge of this UIView.
[read-only]
static
TraitAdjustableInt64. An accessibility trait indicating that the underlying value can be adjusted continuously, as with a slider.
[read-only]
static
TraitAllowsDirectInteractionInt64. An accessibility trait indicating that the user can interact directly with the UIView.
[read-only]
static
TraitButtonInt64. An accessibility trait indicating button-like behavior.
[read-only]
static
TraitCausesPageTurnInt64. An accessibility trait indicating that the UIView causes a page turn after voice over completes.
[read-only]
TraitCollectionUITraitCollection. Returns a trait collection.
[read-only]
static
TraitHeaderInt64. An accessibility trait indicating that the UIView is a divider between content sections.
[read-only]
static
TraitImageInt64. An accessibility trait indicating the view should be treated as an image.
[read-only]
static
TraitKeyboardKeyInt64. An accessibility trait indicating that the UIView should be treated as a keyboard key.
[read-only]
static
TraitLinkInt64. An accessibility trait indicating that the UIView should be treated as a hyperlink.
[read-only]
static
TraitNoneInt64. Indicates that the UIView has no accessibility traits.
[read-only]
static
TraitNotEnabledInt64. An accessibility trait indicating that the UIView is disabled and does not allow user interaction.
[read-only]
static
TraitPlaysSoundInt64. An accessibility trait indicating the accessibility element should play its sound when the UIView is activated.
[read-only]
static
TraitSearchFieldInt64. An accessibility trait indicating that the UIView is a search field.
[read-only]
static
TraitSelectedInt64. An accessibility trait indicating that the UIView is currently selected.
[read-only]
static
TraitStartsMediaSessionInt64. An accessibility trait that starts a media session when the UIView is activated.
[read-only]
static
TraitStaticTextInt64. An accessibility trait indicating that the UIView contains static text.
[read-only]
static
TraitSummaryElementInt64. An accessibility trait indicating that the UIView contains summary information.
[read-only]
static
TraitTabBarInt64.
[read-only]
static
TraitUpdatesFrequentlyInt64. An accessibility trait indicating that the UIView updates frequently.
TransformCGAffineTransform. The transform of the UIView, relative to the center of its bounds.
TranslatesAutoresizingMaskIntoConstraintsBoolean. Specifies whether the autoresizing mask should be translated into constraints for Auto Layout.
[read-only]
static
UILayoutFittingCompressedSizeCGSize. Represents the value associated with the constant UILayoutFittingCompressedSize
[read-only]
static
UILayoutFittingExpandedSizeCGSize. Represents the value associated with the constant UILayoutFittingExpandedSize
[read-only]
static
UnfocusedElementKeyNSString. A string constant used by accessibility APIs (see UIAccessibility.FocusedElement) to identify the previously focused element.
UserInteractionEnabledBoolean. Determines whether input events are processed by this view.
[read-only]
ViewForBaselineLayoutUIView. Returns the UIView upon which baseline constraints should be applied.
[read-only]
ViewForFirstBaselineLayoutUIView. When overridden, allows the app dev to return a subview as the basis for baseline constraints.
[read-only]
ViewForLastBaselineLayoutUIView. When overridden, allows the app dev to return a subview as the basis for baseline constraints.
[read-only]
ViewPrintFormatterUIViewPrintFormatter. Returns a UIViewPrintFormatter appropriate for the UIView.
[read-only]
static
VoiceOverStatusChangedNSString. An accessibility notification indicating that the status of voice-over has changed.
[read-only]
WidthAnchorNSLayoutDimension. The NSLayoutDimension that defines the horizontal extent of this UIView.
[read-only]
WindowUIWindow. The UIWindow of the UIView.

Public Methods

AccessibilityActivate() : Boolean
Activates accessibility for this UIView, returning true on success.
ActionForLayer(CALayer, String) : NSObject
Add(UIView)
This is an alias for UIView.AddSubview, but uses the Add pattern as it allows C# 3.0 constructs to add subviews after creating the object.
AddConstraint(NSLayoutConstraint)
Adds a constraint to the layout of the receiving view or its subviews.
AddConstraints(NSLayoutConstraint[])
Adds multiple constraints to the layout of the receiving view or its subviews.
AddGestureRecognizer(UIGestureRecognizer)
Adds a gesture recognizer to this view.
static
AddKeyframeWithRelativeStartTime(Double, Double, Action)
Adds a single keyframe to an animation.
AddLayoutGuide(UILayoutGuide)
Adds the specified guide, allowing for Autolayout control without creating dummy views.
AddMotionEffect(UIMotionEffect)
Adds the specified motion effect to the view.
AddSubview(UIView)
Adds the specified view as a subview of this view.
AddSubviews(params UIView[])
Convenience routine to add various views to a UIView.
AlignmentRectForFrame(CGRect) : CGRect
Returns a customized alignment rectangle for Auto Layout.
static
Animate(Double, Action)
Animates the property changes that take place in the specified action.
static
Animate(Double, Action, Action)
Animates the property changes that take place in the specified action and invokes a completion callback when the animation completes.
static
Animate(Double, Double, UIViewAnimationOptions, Action, Action)
Invokes animation changes to one or more views by specifying duration, delay, options, and a completion handler.
static
AnimateAsync(Double, Action) : System.Threading.Tasks.Task<bool>
Animates the property changes that take place in the specified animation as an asynchronous operation.
static
AnimateKeyframes(Double, Double, UIViewKeyframeAnimationOptions, Action, UICompletionHandler)
Creates an animation action object that is to be used to set up keyframe-based animations for the current view.
static
AnimateKeyframesAsync(Double, Double, UIViewKeyframeAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Animates the specified action, in which keyframe animations may be used.
static
AnimateNotify(Double, Action, UICompletionHandler)
Animates the property changes that take place in the specified action.
static
AnimateNotify(Double, Double, UIViewAnimationOptions, Action, UICompletionHandler)
Animates the property changes that take place in the specified action and invokes a completion callback when the animation completes.
static
AnimateNotify(Double, Double, nfloat, nfloat, UIViewAnimationOptions, Action, UICompletionHandler)
Executes a view animation that uses a timing curve that corresponds to the activity of a physical spring.
static
AnimateNotifyAsync(Double, Action) : System.Threading.Tasks.Task<bool>
Animates the property changes that take place in the specified block and invokes a completion callback when the animation completes.
static
AnimateNotifyAsync(Double, Double, UIViewAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Executes the specified animation as an asynchronous operation.
static
AnimateNotifyAsync(Double, Double, nfloat, nfloat, UIViewAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Executes a view animation that uses a timing curve that corresponds to the activity of a physical spring.
static
AppearanceWhenContainedIn(params Type[]) : UIView+UIViewAppearance
Returns a strongly typed UIAppearance for instances of this class when the view is hosted in the specified hierarchy.
static
BeginAnimations(String)
Indicates the beginning of an animation block.
static
BeginAnimations(String, IntPtr)
Indicates the beginning of an animation block
BringSubviewToFront(UIView)
Moves the specified subview so that it appears in front of other UIView.Subviews.
Capture(Boolean) : UIImage
static
CommitAnimations()
Indicates the end of an animation block.
ContentCompressionResistancePriority(UILayoutConstraintAxis) : Single
Returns the resistance of an axis to compression below its intrinsic size.
ContentHuggingPriority(UILayoutConstraintAxis) : Single
Returns the resistance of an axis to expansion larger than its intrinsic size.
ConvertPointFromCoordinateSpace(IUICoordinateSpace, CGPoint) : CGPoint
Converts a point from coordinate space.
ConvertPointFromView(UIView, CGPoint) : CGPoint
Returns the point, in the receiver's coordinate system, of the point in the fromView's coordinate space.
ConvertPointToCoordinateSpace(IUICoordinateSpace, CGPoint) : CGPoint
Converts point to coordinate space.
ConvertPointToView(UIView, CGPoint) : CGPoint
Returns the point, in the toView's coordinate system, of the point in this UIView's local coordinate system.
ConvertRectFromCoordinateSpace(IUICoordinateSpace, CGRect) : CGRect
Converts a rectangle from coordinate space.
ConvertRectFromView(UIView, CGRect) : CGRect
Returns the RectangleF, in the receiver's coordinate system, of the rect in the fromView's coordinate space.
ConvertRectToCoordinateSpace(IUICoordinateSpace, CGRect) : CGRect
Converts a rectangle to coordinate space.
ConvertRectToView(UIView, CGRect) : CGRect
Returns the RectangleF, in the toView's coordinate system, of the rect in this UIView's local coordinate system.
DecodeRestorableState(NSCoder)
Application developers can override this method to support state restoration.
DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator)
Called after the UIView has either lost or received focus. (See also UIView.ShouldUpdateFocus.)
DisplayLayer(CALayer)
Draw(CGRect)
Draws the view within the passed-in rectangle.
DrawLayer(CALayer, CGContext)
DrawRect(UIViewPrintFormatter, CGRect)
Draws a region for printing.
DrawViewHierarchy(Boolean, CGRect) : Boolean
Renders the view hierarchy (slower than UIView.SnapshotView).
EncodeRestorableState(NSCoder)
Application developers can override this method to store state associated with the view.
EncodeTo(NSCoder)
Encodes the state of the object on the provided encoder
ExchangeSubview(nint, nint)
This method exchanges the indices of two UIViews within the UIView.Subviews array.
ExerciseAmbiguityInLayout()
Randomly changes the UIView.Frame within an ambiguous set of Auto Layout constraints.
FrameForAlignmentRect(CGRect) : CGRect
Returns the frame resulting from applying the alignmentRect to the current Auto Layout constraints.
GestureRecognizerShouldBegin(UIGestureRecognizer) : Boolean
Determines if the specified gesture recognizers should be allowed to track touch events.
static
GetAppearance(UITraitCollection) : UIView+UIViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance(UITraitCollection, params Type[]) : UIView+UIViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance<T>() : UIView+UIViewAppearance
Obtains the appearance proxy UIViewAppearance for the subclass of UIView.
static
GetAppearance<T>(UITraitCollection) : UIView+UIViewAppearance
Obtains the appearance proxy UIViewAppearance for the subclass of UIView.
static
GetAppearance<T>(UITraitCollection, params Type[]) : UIView+UIViewAppearance
Obtains the appearance proxy UIViewAppearance for the subclass of UIView that has the specified trait collection when the view is hosted in the specified hierarchy.
GetConstraintsAffectingLayout(UILayoutConstraintAxis) : NSLayoutConstraint[]
Returns the array of NSLayoutConstraint that are affecting the layout of the UIView along the specified axis.
GetEnumerator() : IEnumerator
Returns an enumerator that lists all of the subviews in this view
static
GetUserInterfaceLayoutDirection(UISemanticContentAttribute) : UIUserInterfaceLayoutDirection
Returns the layout direction for the specified attribute.
static
GetUserInterfaceLayoutDirection(UISemanticContentAttribute, UIUserInterfaceLayoutDirection) : UIUserInterfaceLayoutDirection
Returns the layout direction for the specified semantic attribute relative to the provided layout direction.
HitTest(UIEvent, CGPoint) : UIView
Determines the most nested view that contains the point.
InsertSubview(UIView, nint)
Inserts the specified subview at the specified location as a subview of this view.
InsertSubviewAbove(UIView, UIView)
Inserts the specified view above the siblingSubvie in the view hierarchy
InsertSubviewBelow(UIView, UIView)
Inserts the specified view below the siblingSubview in the view hierarchy.
InvalidateIntrinsicContentSize()
Alerts the Auto Layout system that the intrinsic value of the UIView has changed.
IsDescendantOfView(UIView) : Boolean
Returns true if this UIView is in the view's view hierarchy.
LayoutIfNeeded()
Lays out the subviews if needed.
LayoutMarginsDidChange()
Lays out changed subviews
LayoutSublayersOfLayer(CALayer)
LayoutSubviews()
Lays out subviews.
MovedToSuperview()
Indicates the UIView has had its UIView.Superview property changed.
MovedToWindow()
Indicates the UIView has had its UIView.Window property changed.
NeedsUpdateConstraints() : Boolean
Indicates that the Auto Layout constraints of the UIView need updating.
static
PerformSystemAnimation(UISystemAnimation, UIView[], UIViewAnimationOptions, Action, UICompletionHandler)
Performs specified system-provided animation sequence on one or more views, together with user-defined parallel animations.
static
PerformSystemAnimationAsync(UISystemAnimation, UIView[], UIViewAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Performs a system-provided animation and optional parallel animations.
static
PerformWithoutAnimation(Action)
Applies a set of changes to a view with a guarantee that animations will not be used.
PointInside(UIEvent, CGPoint) : Boolean
Returns true if the specified point is within the UIView's UIView.Bounds.
RemoveConstraint(NSLayoutConstraint)
Removes an Auto Layout constraint from the UIView's UIView.Constraints.
RemoveConstraints(NSLayoutConstraint[])
Removes multiple Auto Layout constraints from the UIView's UIView.Constraints.
RemoveFromSuperview()
Detaches the UIView from its UIView.Superview.
RemoveGestureRecognizer(UIGestureRecognizer)
Removes a gesture recognizer from the UIView's UIView.GestureRecognizers.
RemoveLayoutGuide(UILayoutGuide)
Removes guide from the UIView.LayoutGuides array.
RemoveMotionEffect(UIMotionEffect)
Removes the specified motion effect to the view.
static
RequiresConstraintBasedLayout() : Boolean
Indicates that the UIView uses Auto Layout.
ResizableSnapshotView(Boolean, UIEdgeInsets, CGRect) : UIView
Creates an image snapshot of a portion of the UIView, with stretchable insets.
SendSubviewToBack(UIView)
Moves a UIView so that it appears behind all its siblings.
static
SetAnimationBeginsFromCurrentState(Boolean)
Sets whether the animation transaction will animate from the current view state.
static
SetAnimationCurve(UIViewAnimationCurve)
Sets the animation curve for this animation transaction.
static
SetAnimationDelay(Double)
Sets the animation delay for this animation transaction.
static
SetAnimationDelegate(NSObject)
Allows the app developer to create a custom animation delegate.
static
SetAnimationDidStopSelector(Selector)
Specifies the selector to be used by a custom animation delegate when animation ends.
static
SetAnimationDuration(Double)
Sets the duration for this animation transaction.
static
SetAnimationRepeatAutoreverses(Boolean)
Sets whether this animation transaction will automatically reverse when it completes.
static
SetAnimationRepeatCount(Single)
Sets the repeat count for this animation transaction.
static
SetAnimationStartDate(NSDate)
Specifies when the animation should begin.
static
SetAnimationTransition(UIViewAnimationTransition, UIView, Boolean)
Sets a transition to be used during an animation block.
static
SetAnimationWillStartSelector(Selector)
Specifies the selector to be used by a custom animation delegate when animation is about to begin.
SetContentCompressionResistancePriority(Single, UILayoutConstraintAxis)
Sets the resistance to compression below the UIView's UIView.IntrinsicContentSize.
SetContentHuggingPriority(Single, UILayoutConstraintAxis)
Sets the resistance to expansion beyond the UIView's UIView.IntrinsicContentSize.
SetNeedsDisplay()
Marks the view dirty and queues a redraw operation on it.
SetNeedsDisplayInRect(CGRect)
Marks a region of the view as dirty and queues a redraw operation on that region.
SetNeedsFocusUpdate()
When this is the active focus environment, requests a focus update, which can potentially change the UIView.PreferredFocusView. (See also UIView.UpdateFocusIfNeeded.)
SetNeedsLayout()
Sets whether subviews need to be rearranged before displaying.
SetNeedsUpdateConstraints()
Indicates to the Auto Layout system that it must call UIView.UpdateConstraints.
ShouldUpdateFocus(UIFocusUpdateContext) : Boolean
Called prior to the UIView either losing or receiving focus. If either focus environment returns false, the focus update is canceled.
SizeThatFits(CGSize) : CGSize
Returns the SizeF that best fits this UIView.
SizeToFit()
Moves and resizes the UIView so that it tightly encloses its UIView.Subviews
SnapshotView(Boolean) : UIView
Creates a UIView that contains a snapshot image of the current view's contents.
SubviewAdded(UIView)
Tells the view when subviews are added.
SystemLayoutSizeFittingSize(CGSize) : CGSize
Calculates the smallest or largest size that this UIView can have that satisfies its Auto Layout constraints.
SystemLayoutSizeFittingSize(Single, Single, CGSize) : CGSize
Defines the fitting constraints for layout.
TintColorDidChange()
Called when the UIView.TintColor changes, such as when a UIActionSheet is displayed.
TraitCollectionDidChange(UITraitCollection)
Defines previous trait collection.
static
Transition(UIView, Double, UIViewAnimationOptions, Action, Action)
Specifies a transition animation on the specified collection view.
static
Transition(UIView, UIView, Double, UIViewAnimationOptions, Action)
Specifies a transition animation on the specified collection view.
static
TransitionNotify(UIView, Double, UIViewAnimationOptions, Action, UICompletionHandler)
Creates a transition animation action that is used for the current container view.
static
TransitionNotify(UIView, UIView, Double, UIViewAnimationOptions, UICompletionHandler)
Specifies a transition animation to be used between the specified UIViews.
static
TransitionNotifyAsync(UIView, Double, UIViewAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Specifies a transition animation on the specified collection view.
static
TransitionNotifyAsync(UIView, UIView, Double, UIViewAnimationOptions) : System.Threading.Tasks.Task<bool>
Specifies a transition animation to be used between the specified s.
UpdateConstraints()
Updates the Auto Layout constraints for the UIView.
UpdateConstraintsIfNeeded()
Updates the constraints of the UIView and its UIView.Subviews.
UpdateFocusIfNeeded()
If any focus environment has a pending update, this method forces an immediate focus update. Unlike UIView.SetNeedsFocusUpdate, this method may be called by any UIView, whether it currently contains focus or not.
ViewWithTag(nint) : UIView
Returns the UIView identified by the tag. May return null.
WillDrawLayer(CALayer)
WillMoveToSuperview(UIView)
Called before the UIView.Superview changes.
WillMoveToWindow(UIWindow)

This method is called by the runtime when assigning a new UIWindow to the UIView's view hierarcy. This method will be called on all UIViews in the hierarchy, not just the top-level UIView.

By default, this method does nothing. Application developers can override the method in order to perform additional processing.

WillRemoveSubview(UIView)
Called prior to the removal of a subview.

Protected Methods

override
Dispose(Boolean)
Releases the resources used by the UIView object.

Public Events

static
AnimationWillEndThis event is raised when the animations will end.
static
AnimationWillStartThis event is raised when the animations will start.