Class

TVViewElementStyle

A style applied to a view element.

Declaration

@interface TVViewElementStyle : NSObject

Topics

Retrieving the Style for an Element

- valueForStyleProperty:

Returns the value associated with a given style name.

Defining the Height and Width of an Element

height

The height, in pixels, for an element.

maxHeight

The maximum height, in pixels, for the element.

maxWidth

The maximum width, in pixels, for an element.

minHeight

The minimum height, in pixels, for an element.

minWidth

The minimum width, in pixels, for an element.

width

The width, in pixels, for an element.

Aligning and Positioning an Element

alignment

A value indicating how an item is aligned inside of an element.

TVElementAlignment

Location of an item inside of an element on the horizontal axis.

contentAlignment

A value indicating how items inside of an element are aligned.

TVElementContentAlignment

Location of items inside of an element on the vertical axis.

focusMargin

The amount of space, in pixels, a custom cell requires when it comes into focus.

interitemSpacing

The spacing, in pixels, between items inside of an element.

margin

The amount of space, in pixels, between the element and other elements.

padding

The amount of space, in pixels, between the border and the contents of the element.

position

A value indicating the position of the element relative to the screen or its containing element.

TVElementPosition

Location of an element relative to the screen or its containing element.

Changing the Text of an Element

fontSize

The font size applied to any text contained in the element.

fontWeight

A string indicating how thick or thin the font is.

maxTextLines

The maximum number of lines of text allowed inside of the element.

textAlignment

The horizontal alignment of text within an element.

textHighlightStyle

A string indicating how a label reacts when it is in focus.

textMinimumScaleFactor

The minimum size text can be if the original text size does not fit in an element.

textStyle

The style applied to the text in an element.

Modifying an Image

imageTreatmentName

A value that determines how an image is displayed.

ratingStyle

A string indicating the style to be used by a rating element.

Coloring an Element

backgroundColor

The background color for an element.

color

The color for an element.

highlightColor

The color of the element when it is highlighted.

tintColor

The tint color applied to an element.

Element Styles

Transition Style Values

The type of transition to apply to an element.

Rating Style Values

The size of the star image used for a rating element.

Label State Values

How text is displayed when an element is in focus.

Text Style Values

Font size and weight.

Relationships

Inherits From

Conforms To

See Also

Custom Styles

TVStyleFactory

An object used to register custom style properties.

TVColor

The color data used by styles.