MonoTouch.UIKit.UIView.AlignmentRectForFrame Method
Returns a customized alignment rectangle for Auto Layout.

Syntax

[MonoTouch.Foundation.Export("alignmentRectForFrame:")]
[MonoTouch.ObjCRuntime.Availability(Introduced=MonoTouch.ObjCRuntime.Platform.iOS_6_0)]
public virtual System.Drawing.RectangleF AlignmentRectForFrame (System.Drawing.RectangleF frame)

See Also

UIView.FrameForAlignmentRect
UIView.AlignmentRectInsets
UIView.ViewForBaselineLayout

Parameters

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

Returns

The alignment rectangle appropriate to the frame.

Remarks

By overriding this method, application developers can fully customize the alignment rectangle of the MonoTouch.UIKit.UIView.Application developers who override this method must also override the complementary method UIView.FrameForAlignmentRect. 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 MonoTouch.UIKit.UIView may include visual elements, such as drop-shadows, that are not symmetrical around the MonoTouch.UIKit.UIView's logical center. The "alignment rectangle" for a MonoTouch.UIKit.UIView should be related to its logical content.

By default, the "alignment rectangle" of a MonoTouch.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: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0