UIStringDrawing.StringSize UIStringDrawing.StringSize Method

Definition

Overloads

StringSize(NSString, UIFont, nfloat, nfloat, nfloat, UILineBreakMode) StringSize(NSString, UIFont, nfloat, nfloat, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(NSString, UIFont) StringSize(NSString, UIFont)

Developers should use GetSizeUsingAttributes(NSString, UIStringAttributes) rather than this deprecated method.

StringSize(String, UIFont) StringSize(String, UIFont)

Developers should use GetSizeUsingAttributes(NSString, UIStringAttributes) rather than this deprecated method.

StringSize(NSString, UIFont, CGSize) StringSize(NSString, UIFont, CGSize)

The calculated size of the string if rendered with the font or constrainedToSize, whichever is smaller.

StringSize(String, UIFont, CGSize) StringSize(String, UIFont, CGSize)

The calculated size of the string if rendered with the font or constrainedToSize, whichever is smaller.

StringSize(NSString, UIFont, CGSize, UILineBreakMode) StringSize(NSString, UIFont, CGSize, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(NSString, UIFont, nfloat, UILineBreakMode) StringSize(NSString, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(String, UIFont, CGSize, UILineBreakMode) StringSize(String, UIFont, CGSize, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(String, UIFont, nfloat, UILineBreakMode) StringSize(String, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(String, UIFont, nfloat, nfloat, nfloat, UILineBreakMode) StringSize(String, UIFont, nfloat, nfloat, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(NSString, UIFont, nfloat, nfloat, nfloat, UILineBreakMode) StringSize(NSString, UIFont, nfloat, nfloat, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[Foundation.Export("sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.ThreadSafe]
public static CoreGraphics.CGSize StringSize (this Foundation.NSString This, UIKit.UIFont font, nfloat minFontSize, ref nfloat actualFontSize, nfloat forWidth, UIKit.UILineBreakMode lineBreakMode);
static member StringSize : Foundation.NSString * UIKit.UIFont * nfloat *  * nfloat * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

font
UIFont UIFont
minFontSize
nfloat nfloat
actualFontSize
nfloat nfloat
forWidth
nfloat nfloat

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

StringSize(NSString, UIFont) StringSize(NSString, UIFont)

Developers should use GetSizeUsingAttributes(NSString, UIStringAttributes) rather than this deprecated method.

[Foundation.Export("sizeWithFont:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'NSString.GetSizeUsingAttributes (UIStringAttributes)' instead.")]
[ObjCRuntime.ThreadSafe]
public static CoreGraphics.CGSize StringSize (this Foundation.NSString This, UIKit.UIFont font);
static member StringSize : Foundation.NSString * UIKit.UIFont -> CoreGraphics.CGSize

Parameters

This
NSString NSString

The instance on which this method operates.

font
UIFont UIFont

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

StringSize(String, UIFont) StringSize(String, UIFont)

Developers should use GetSizeUsingAttributes(NSString, UIStringAttributes) rather than this deprecated method.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.None, "Use NSString.GetSizeUsingAttributes(UIStringAttributes) instead.")]
public static CoreGraphics.CGSize StringSize (this string This, UIKit.UIFont font);
static member StringSize : string * UIKit.UIFont -> CoreGraphics.CGSize

Parameters

This
String String

The instance on which this method operates.

font
UIFont UIFont

Returns

StringSize(NSString, UIFont, CGSize) StringSize(NSString, UIFont, CGSize)

The calculated size of the string if rendered with the font or constrainedToSize, whichever is smaller.

[Foundation.Export("sizeWithFont:constrainedToSize:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext)' instead.")]
[ObjCRuntime.ThreadSafe]
public static CoreGraphics.CGSize StringSize (this Foundation.NSString This, UIKit.UIFont font, CoreGraphics.CGSize constrainedToSize);
static member StringSize : Foundation.NSString * UIKit.UIFont * CoreGraphics.CGSize -> CoreGraphics.CGSize

Parameters

This
NSString NSString

The instance on which this method operates.

font
UIFont UIFont
constrainedToSize
CGSize CGSize

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

StringSize(String, UIFont, CGSize) StringSize(String, UIFont, CGSize)

The calculated size of the string if rendered with the font or constrainedToSize, whichever is smaller.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.None, "Use NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext) instead.")]
public static CoreGraphics.CGSize StringSize (this string This, UIKit.UIFont font, CoreGraphics.CGSize constrainedToSize);
static member StringSize : string * UIKit.UIFont * CoreGraphics.CGSize -> CoreGraphics.CGSize

Parameters

This
String String

The instance on which this method operates.

font
UIFont UIFont
constrainedToSize
CGSize CGSize

Returns

StringSize(NSString, UIFont, CGSize, UILineBreakMode) StringSize(NSString, UIFont, CGSize, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[Foundation.Export("sizeWithFont:constrainedToSize:lineBreakMode:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext)' instead.")]
[ObjCRuntime.ThreadSafe]
public static CoreGraphics.CGSize StringSize (this Foundation.NSString This, UIKit.UIFont font, CoreGraphics.CGSize constrainedToSize, UIKit.UILineBreakMode lineBreakMode);
static member StringSize : Foundation.NSString * UIKit.UIFont * CoreGraphics.CGSize * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

font
UIFont UIFont
constrainedToSize
CGSize CGSize

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

StringSize(NSString, UIFont, nfloat, UILineBreakMode) StringSize(NSString, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[Foundation.Export("sizeWithFont:forWidth:lineBreakMode:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, "Use 'NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext)' instead.")]
[ObjCRuntime.ThreadSafe]
public static CoreGraphics.CGSize StringSize (this Foundation.NSString This, UIKit.UIFont font, nfloat forWidth, UIKit.UILineBreakMode breakMode);
static member StringSize : Foundation.NSString * UIKit.UIFont * nfloat * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

font
UIFont UIFont
forWidth
nfloat nfloat

Returns

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

StringSize(String, UIFont, CGSize, UILineBreakMode) StringSize(String, UIFont, CGSize, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.None, "Use NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext) instead.")]
public static CoreGraphics.CGSize StringSize (this string This, UIKit.UIFont font, CoreGraphics.CGSize constrainedToSize, UIKit.UILineBreakMode lineBreakMode);
static member StringSize : string * UIKit.UIFont * CoreGraphics.CGSize * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

This
String String
font
UIFont UIFont
constrainedToSize
CGSize CGSize

Returns

StringSize(String, UIFont, nfloat, UILineBreakMode) StringSize(String, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.None, "Use NSString.GetBoundingRect (CGSize, NSStringDrawingOptions, UIStringAttributes, NSStringDrawingContext) instead.")]
public static CoreGraphics.CGSize StringSize (this string This, UIKit.UIFont font, nfloat forWidth, UIKit.UILineBreakMode breakMode);
static member StringSize : string * UIKit.UIFont * nfloat * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

This
String String
font
UIFont UIFont
forWidth
nfloat nfloat

Returns

StringSize(String, UIFont, nfloat, nfloat, nfloat, UILineBreakMode) StringSize(String, UIFont, nfloat, nfloat, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.None, null)]
public static CoreGraphics.CGSize StringSize (this string This, UIKit.UIFont font, nfloat minFontSize, ref nfloat actualFontSize, nfloat forWidth, UIKit.UILineBreakMode lineBreakMode);
static member StringSize : string * UIKit.UIFont * nfloat *  * nfloat * UIKit.UILineBreakMode -> CoreGraphics.CGSize

Parameters

This
String String
font
UIFont UIFont
minFontSize
nfloat nfloat
actualFontSize
nfloat nfloat
forWidth
nfloat nfloat

Returns

Applies to