UIKit.UIView.FrameForAlignmentRect Method
Returns the frame resulting from applying the alignmentRect to the current Auto Layout constraints.

Syntax

[Foundation.Export("frameForAlignmentRect:")]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_6_0)]
public virtual CoreGraphics.CGRect FrameForAlignmentRect (CoreGraphics.CGRect alignmentRect)

See Also

UIView.AlignmentRectForFrame
UIView.AlignmentRectInsets
UIView.ViewForBaselineLayout

Parameters

alignmentRect
A System.Drawing.RectangleF for which the frame rectangle should be calculated.

Returns

The frame rectangle appropriate to the alignmentRect/

Remarks

By overriding this method, application developers can fully customize the alignment rectangle of the UIKit.UIView.Application developers who override this method must also override the complementary method UIView.AlignmentRectForFrame. The two methods must provide complementary values.

Auto Layout uses "alignment rectangles" to layout subviews rather than the subviews' UIView.Frame. The UIView.Frame of a UIKit.UIView may include visual elements, such as drop-shadows, that are not symmetrical around the UIKit.UIView's logical center. The "alignment rectangle" for a UIKit.UIView should be related to its logical content.

By default, the "alignment rectangle" of a UIKit.UIView is the UIView.Frame plus the UIView.AlignmentRectInsets. The UIView.AlignmentRectForFrame and UIView.FrameForAlignmentRect methods can be used to fully customize the alignment rectangle.

Requirements

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