MonoTouch.UIKit.UIView: Method Members

The methods of MonoTouch.UIKit.UIView are listed below. For a list of all members, see the UIView Members list.

See Also: Inherited members from MonoTouch.UIKit.UIResponder

Public Methods

AccessibilityActivate() : bool
Activates accessibility for this UIView, returning true on success.
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, MonoTouch.Foundation.NSAction)
Adds a single keyframe to an animation, correlated with a relative start time.
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(System.Drawing.RectangleF) : System.Drawing.RectangleF
Returns a customized alignment rectangle for Auto Layout.
static
Animate(double, MonoTouch.Foundation.NSAction)
Animates the property changes that take place in the specified action.
static
Animate(double, MonoTouch.Foundation.NSAction, MonoTouch.Foundation.NSAction)
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, MonoTouch.Foundation.NSAction, MonoTouch.Foundation.NSAction)
Creates an animation action that you can use to set up a keyframe-based animation. This action animates the property changes that take place in the specified action and invokes a completion callback when the animation completes.
static
AnimateAsync(double, MonoTouch.Foundation.NSAction) : 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, MonoTouch.Foundation.NSAction, UICompletionHandler)
Animates the specified animations action, in which keyframe animations may be used.
static
AnimateKeyframesAsync(double, double, UIViewKeyframeAnimationOptions, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Animates the specified action, in which keyframe animations may be used.
static
AnimateNotify(double, MonoTouch.Foundation.NSAction, UICompletionHandler)
Animates the property changes that take place in the specified action.
static
AnimateNotify(double, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction, 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, float, float, UIViewAnimationOptions, MonoTouch.Foundation.NSAction, UICompletionHandler)
Animates the specified property changes with an added spring-like effect.
static
AnimateNotifyAsync(double, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Animates the property changes that take place in the specified action and invokes a completion callback when the animation completes.
static
AnimateNotifyAsync(double, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Executes the specified animation as an asynchronous operation.
static
AnimateNotifyAsync(double, double, float, float, UIViewAnimationOptions, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Animates the specified property changes with an added spring-like effect.
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.
static
CommitAnimations()
Indicates the end of an animation block.
ContentCompressionResistancePriority(UILayoutConstraintAxis) : float
Returns the resistance of an axis to compression below its intrinsic size.
ContentHuggingPriority(UILayoutConstraintAxis) : float
Returns the resistance of an axis to expansion larger than its intrinsic size.
ConvertPointFromCoordinateSpace(System.Drawing.PointF, IUICoordinateSpace) : System.Drawing.PointF
Converts a point from coordinate space.
ConvertPointFromView(System.Drawing.PointF, UIView) : System.Drawing.PointF
Returns the point, in the receiver's coordinate system, of the point in the fromView's coordinate space.
ConvertPointToCoordinateSpace(System.Drawing.PointF, IUICoordinateSpace) : System.Drawing.PointF
Converts point to coordinate space.
ConvertPointToView(System.Drawing.PointF, UIView) : System.Drawing.PointF
Returns the point, in the toView's coordinate system, of the point in this MonoTouch.UIKit.UIView's local coordinate system.
ConvertRectFromCoordinateSpace(System.Drawing.RectangleF, IUICoordinateSpace) : System.Drawing.RectangleF
Converts a rectangle from coordinate space.
ConvertRectFromView(System.Drawing.RectangleF, UIView) : System.Drawing.RectangleF
Returns the System.Drawing.RectangleF, in the receiver's coordinate system, of the rect in the fromView's coordinate space.
ConvertRectToCoordinateSpace(System.Drawing.RectangleF, IUICoordinateSpace) : System.Drawing.RectangleF
Converts a rectangle to coordinate space.
ConvertRectToView(System.Drawing.RectangleF, UIView) : System.Drawing.RectangleF
Returns the System.Drawing.RectangleF, in the toView's coordinate system, of the rect in this MonoTouch.UIKit.UIView's local coordinate system.
DecodeRestorableState(MonoTouch.Foundation.NSCoder)
Application developers can override this method to support state restoration.
Draw(System.Drawing.RectangleF)
Draws the view within the passed-in rectangle.
DrawRect(System.Drawing.RectangleF, UIViewPrintFormatter)
Draws a region for printing.
DrawString(string, System.Drawing.PointF, UIFont) : System.Drawing.SizeF
Draws the specified text at the specified location with the specified font.
DrawString(string, System.Drawing.RectangleF, UIFont) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.DrawString(PointF, UIStringAttributes) instead.

Draws the string in the specified rectangle with the specified font.

DrawString(string, System.Drawing.RectangleF, UIFont, UILineBreakMode) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.DrawString(RectangleF, UIStringAttributes) instead

Draws the string in the specified rectangle with the specified font.

DrawString(string, System.Drawing.PointF, float, UIFont, UILineBreakMode) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.DrawString(RectangleF, UIStringAttributes) instead.

Draws the string in the specified rectangle with the specified font.

DrawString(string, System.Drawing.RectangleF, UIFont, UILineBreakMode, UITextAlignment) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.DrawString(RectangleF, UIStringAttributes) instead

Draws the string in the specified rectangle with the specified font.

DrawString(string, System.Drawing.PointF, float, UIFont, float, UILineBreakMode, UIBaselineAdjustment) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.DrawString(RectangleF, UIStringAttributes) instead.

Draws the string in the specified rectangle with the specified font.

DrawString(string, System.Drawing.PointF, float, UIFont, float, ref float, UILineBreakMode, UIBaselineAdjustment) : System.Drawing.SizeF
Obsolete version of this method, use the version with a `ref float actualizeFontSize' parameter instead
DrawString(string, System.Drawing.PointF, float, UIFont, float, float, UILineBreakMode, UIBaselineAdjustment) : System.Drawing.SizeF
Obsolete version of this method, use the version with a `ref float actualizeFontSize' parameter instead
DrawViewHierarchy(System.Drawing.RectangleF, bool) : bool
Renders the view hierarchy (slower than UIView.SnapshotView).
EncodeRestorableState(MonoTouch.Foundation.NSCoder)
Application developers can override this method to store state associated with the view.
EndEditing(bool) : bool
Causes the view (or an appropriate subview) to resign first responder status.
ExchangeSubview(int, int)
This method exchanges the indices of two MonoTouch.UIKit.UIViews within the UIView.Subviews array.
ExerciseAmbiguityInLayout()
Randomly changes the UIView.Frame within an ambiguous set of Auto Layout constraints.
FrameForAlignmentRect(System.Drawing.RectangleF) : System.Drawing.RectangleF
Returns the frame resulting from applying the alignmentRect to the current Auto Layout constraints.
GestureRecognizerShouldBegin(UIGestureRecognizer) : bool
Determines if the specified gesture recognizers should be allowed to track touch events.
static
GetAppearance<T>() : UIView.UIViewAppearance
The strongly-typed IUIAppearance for this object.
static
GetAppearance<T>(UITraitCollection) : UIView.UIViewAppearance
IUIAppearance for this object with specified traits.
static
GetAppearance<T>(UITraitCollection, params Type[]) : UIView.UIViewAppearance
IUIAppearance for this object with specified traits and customized container.
GetConstraintsAffectingLayout(UILayoutConstraintAxis) : NSLayoutConstraint[]
Returns the array of MonoTouch.UIKit.NSLayoutConstraint that are affecting the layout of the MonoTouch.UIKit.UIView along the specified axis.
GetEnumerator() : IEnumerator
Returns an enumerator that lists all of the subviews in this view
HitTest(System.Drawing.PointF, UIEvent) : UIView
Determines the most nested view that contains the point.
InsertSubview(UIView, int)
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 MonoTouch.UIKit.UIView has changed.
IsDescendantOfView(UIView) : bool
Returns true if this MonoTouch.UIKit.UIView is in the view's view hierarchy.
LayoutIfNeeded()
Lays out the subviews if needed.
LayoutMarginsDidChange()
Lays out changed subviews
LayoutSubviews()
Lays out subviews.
MovedToSuperview()
Indicates the MonoTouch.UIKit.UIView has had its UIView.Superview property changed.
MovedToWindow()
Indicates the MonoTouch.UIKit.UIView has had its UIView.Window property changed.
NeedsUpdateConstraints() : bool
Indicates that the Auto Layout constraints of the MonoTouch.UIKit.UIView need updating.
static
PerformSystemAnimation(UISystemAnimation, UIView[], UIViewAnimationOptions, MonoTouch.Foundation.NSAction, UICompletionHandler)
Performs a system-provided animation and optional parallel animations.
static
PerformSystemAnimationAsync(UISystemAnimation, UIView[], UIViewAnimationOptions, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Performs a system-provided animation and optional parallel animations.
static
PerformWithoutAnimation(MonoTouch.Foundation.NSAction)
Applies a set of changes to a view with a guarantee that animations will not be used.
PointInside(System.Drawing.PointF, UIEvent) : bool
Returns true if the specified point is within the MonoTouch.UIKit.UIView's UIView.Bounds.
RemoveConstraint(NSLayoutConstraint)
Removes an Auto Layout constraint from the MonoTouch.UIKit.UIView's UIView.Constraints.
RemoveConstraints(NSLayoutConstraint[])
Removes multiple Auto Layout constraints from the MonoTouch.UIKit.UIView's UIView.Constraints.
RemoveFromSuperview()
Detaches the MonoTouch.UIKit.UIView from its UIView.Superview.
RemoveGestureRecognizer(UIGestureRecognizer)
Removes a gesture recognizer from the MonoTouch.UIKit.UIView's UIView.GestureRecognizers.
RemoveMotionEffect(UIMotionEffect)
Removes the specified motion effect to the view.
static
RequiresConstraintBasedLayout() : bool
Indicates that the MonoTouch.UIKit.UIView uses Auto Layout.
ResizableSnapshotView(System.Drawing.RectangleF, bool, UIEdgeInsets) : UIView
Creates an image snapshot of a portion of the MonoTouch.UIKit.UIView, with stretchable insets.
SendSubviewToBack(UIView)
Moves a MonoTouch.UIKit.UIView so that it appears behind all its siblings.
static
SetAnimationBeginsFromCurrentState(bool)
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(MonoTouch.Foundation.NSObject)
Allows the app developer to create a custom animation delegate.
static
SetAnimationDidStopSelector(MonoTouch.ObjCRuntime.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(bool)
Sets whether this animation transaction will automatically reverse when it completes.
static
SetAnimationRepeatCount(float)
Sets the repeat count for this animation transaction.
static
SetAnimationStartDate(MonoTouch.Foundation.NSDate)
Specifies when the animation should begin.
static
SetAnimationTransition(UIViewAnimationTransition, UIView, bool)
Sets a transition to be used during an animation block.
static
SetAnimationWillStartSelector(MonoTouch.ObjCRuntime.Selector)
Specifies the selector to be used by a custom animation delegate when animation is about to begin.
SetContentCompressionResistancePriority(float, UILayoutConstraintAxis)
Sets the resistance to compression below the MonoTouch.UIKit.UIView's UIView.IntrinsicContentSize.
SetContentHuggingPriority(float, UILayoutConstraintAxis)
Sets the resistance to expansion beyond the MonoTouch.UIKit.UIView's UIView.IntrinsicContentSize.
SetNeedsDisplay()
Marks the view dirty and queues a redraw operation on it.
SetNeedsDisplayInRect(System.Drawing.RectangleF)
Marks a region of the view as dirty and queues a redraw operation on that region.
SetNeedsLayout()
Sets whether subviews need to be rearranged before displaying.
SetNeedsUpdateConstraints()
Indicates to the Auto Layout system that it must call UIView.UpdateConstraints.
SizeThatFits(System.Drawing.SizeF) : System.Drawing.SizeF
Returns the System.Drawing.SizeF that best fits this MonoTouch.UIKit.UIView.
SizeToFit()
Moves and resizes the MonoTouch.UIKit.UIView so that it tightly encloses its UIView.Subviews
SnapshotView(bool) : UIView
Creates a MonoTouch.UIKit.UIView that contains a snapshot image of the current view's contents.
StringSize(string, UIFont) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.GetSizeUsingAttributes(UIStringAttributes) instead.

Calculates the System.Drawing.SizeF of the specified string if it were rendered with the specified font.

StringSize(string, UIFont, System.Drawing.SizeF) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.GetBoundingRect (SizeF, NSStringDrawingOptions, UIStringAttributes,NSStringDrawingContext) instead.

Calculates the System.Drawing.SizeF of the specified string if it were rendered with the specified font and constrained to the specified size.

StringSize(string, UIFont, System.Drawing.SizeF, UILineBreakMode) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.GetBoundingRect (SizeF, NSStringDrawingOptions, UIStringAttributes,NSStringDrawingContext) instead.

Calculates the System.Drawing.SizeF of the specified string if it were rendered with the specified: font, size constraint, and line-break mode.

StringSize(string, UIFont, float, UILineBreakMode) : System.Drawing.SizeF

Deprecated in iOS7. Use NSString.GetBoundingRect (SizeF, NSStringDrawingOptions, UIStringAttributes,NSStringDrawingContext) instead.

Calculates the System.Drawing.SizeF of a single line of the specified string if it were rendered with the specified: font, width constraint, and line-break mode.

StringSize(string, UIFont, float, ref float, float, UILineBreakMode) : System.Drawing.SizeF

Deprecated on iOS7.

Calculates the System.Drawing.SizeF and size of the font of the first line of the specified string if it were rendered with the specified constraints.

SubviewAdded(UIView)
Tells the view when subviews are added.
SystemLayoutSizeFittingSize(System.Drawing.SizeF) : System.Drawing.SizeF
Calculates the smallest or largest size that this MonoTouch.UIKit.UIView can have that satisfies its Auto Layout constraints.
SystemLayoutSizeFittingSize(System.Drawing.SizeF, float, float) : System.Drawing.SizeF
Defines the fitting constraints for layout.
TintColorDidChange()
Called when the UIView.TintColor changes, such as when a MonoTouch.UIKit.UIActionSheet is displayed.
TraitCollectionDidChange(UITraitCollection)
Defines previous trait collection.
static
Transition(UIView, UIView, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction)
Specifies a transition animation to be used between the specified MonoTouch.UIKit.UIViews.
static
Transition(UIView, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction, MonoTouch.Foundation.NSAction)
Specifies a transition animation on the specified collection view.
static
TransitionNotify(UIView, UIView, double, UIViewAnimationOptions, UICompletionHandler)
Specifies a transition animation to be used between the specified MonoTouch.UIKit.UIViews.
static
TransitionNotify(UIView, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction, UICompletionHandler)
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.
static
TransitionNotifyAsync(UIView, double, UIViewAnimationOptions, MonoTouch.Foundation.NSAction) : System.Threading.Tasks.Task<bool>
Specifies a transition animation on the specified collection view.
UpdateConstraints()
Updates the Auto Layout constraints for the MonoTouch.UIKit.UIView.
UpdateConstraintsIfNeeded()
Updates the constraints of the MonoTouch.UIKit.UIView and its UIView.Subviews.
ViewWithTag(int) : UIView
Returns the MonoTouch.UIKit.UIView identified by the tag. May return null.
WillMoveToSuperview(UIView)
Called before the UIView.Superview changes.
WillMoveToWindow(UIWindow)

This method is called by the runtime when assigning a new MonoTouch.UIKit.UIWindow to the MonoTouch.UIKit.UIView's view hierarcy. This method will be called on all MonoTouch.UIKit.UIViews in the hierarchy, not just the top-level MonoTouch.UIKit.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(bool)
Releases the resources used by the UIView object.