Instance Method

widthForLayer:edge:

Returns the width of an edge of a specified layer of the text block.

Declaration

- (CGFloat)widthForLayer:(NSTextBlockLayer)layer edge:(NSRectEdge)edge;

Parameters

layer

The layer to examine.

edge

The edge of the layer to examine.

Return Value

The width of the edge of layer. This value must be interpreted according to the value type returned by widthValueTypeForLayer:edge:.

See Also

Getting and setting margins, borders, and padding

- setWidth:type:forLayer:edge:

Sets the width of a specified edge of a specified layer of the text block.

- setWidth:type:forLayer:

Sets the width of all edges of a specified layer of the text block.

- widthValueTypeForLayer:edge:

Returns the value type of an edge of a specified layer of the text block.

NSTextBlockLayer

The following constants specify values used by the properties and methods contentWidthValueType, setWidth:type:forLayer:edge:, setWidth:type:forLayer:, widthForLayer:edge:, and widthValueTypeForLayer:edge: to specify text block layer values.