編輯

共用方式為


UIStringDrawing.StringSize Method

Definition

Overloads

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

Gets the CGSize necessary to display this NSString.

StringSize(NSString, UIFont)

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

StringSize(String, UIFont)

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

StringSize(NSString, UIFont, CGSize)

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

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)

Gets the CGSize necessary to display this NSString.

StringSize(NSString, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(String, UIFont, CGSize, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

StringSize(String, UIFont, nfloat, UILineBreakMode)

Gets the CGSize necessary to display this NSString.

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

Gets the CGSize necessary to display this NSString.

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

This
NSString
font
UIFont
minFontSize
nfloat
actualFontSize
nfloat
forWidth
nfloat
lineBreakMode
UILineBreakMode

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

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

The instance on which this method operates.

font
UIFont

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

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

The instance on which this method operates.

font
UIFont

Returns

Attributes

Applies to

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

The instance on which this method operates.

font
UIFont
constrainedToSize
CGSize

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

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

The instance on which this method operates.

font
UIFont
constrainedToSize
CGSize

Returns

Attributes

Applies to

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

This
NSString
font
UIFont
constrainedToSize
CGSize
lineBreakMode
UILineBreakMode

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

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

This
NSString
font
UIFont
forWidth
nfloat
breakMode
UILineBreakMode

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

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
font
UIFont
constrainedToSize
CGSize
lineBreakMode
UILineBreakMode

Returns

Attributes

Applies to

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
font
UIFont
forWidth
nfloat
breakMode
UILineBreakMode

Returns

Attributes

Applies to

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
font
UIFont
minFontSize
nfloat
actualFontSize
nfloat
forWidth
nfloat
lineBreakMode
UILineBreakMode

Returns

Attributes

Applies to