Index

Redbeard Theme Reference V1.0

RBSwitchField

Properties

States

Property: invalidState

The theme to use when the field failed validation.

Property: validState

The theme to use when the field passed validation.


activityView

Type: RBActivityView

The theme of the managed activity indicator on the view.

alpha

Type: decimal (0.0 - 1.0)

The alpha channel of the view.

backgroundColor

Type: UIColor

The background color of the view.

backgroundColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

borderColor

Type: UIColor

The color to use on the border on the view.

borderColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

borderEdges

Type: UIRectEdge

The edges on which to apply a border.

Options:

  • right
  • all
  • top
  • bottom
  • none
  • left

borderWidth

Type: decimal

The width of the border to use on the view in pt.

contentHorizontalAlignment

Type: UIControlContentHorizontalAlignment

Options:

  • center
  • fill
  • right
  • left

contentMode

Type: UIViewContentMode

The content mode of the view.

Options:

  • left
  • right
  • scaleaspectfill
  • topleft
  • redraw
  • scaleaspectfit
  • bottomleft
  • scaletofill
  • bottomright
  • topright
  • center
  • bottom
  • top

contentVerticalAlignment

Type: UIControlContentVerticalAlignment

Options:

  • bottom
  • top
  • fill
  • center

cornerRadius

Type: decimal

The rounded corner radius to use on the view in pt.

corners

Type: UIRectCorner

The corners that should be rounded.

Options:

  • all
  • bottomleft
  • topleft
  • bottomright
  • topright

hidden

Type: boolean

Whether or not the view is hidden.

label

Type: RBLabel

The theme of the label.

labelAlignment

Type: RBHorizontalAlignment

The alignment of the label relative to the switch control. Centered alignment will have no effect.

Options:

  • center
  • right
  • left

layerShadowColor

Type: UIColor

The color to use for the shadow on the view.

layerShadowColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

layerShadowOffset

Type: CGSize

The shadow offset to use.

layerShadowOpacity

Type: decimal

The shadow opacity to use on the view.

layerShadowRadius

Type: decimal

The shadow radius to use on the view in pt.

margin

Type: UIEdgeInsets

The margin to provide around the content.

offImage

Type: UIImage

The image to display when the switch is in the off state.

offImageTintColor

Type: UIColor

The tint color of the image.

offTintColor

Type: UIColor

The tint color of the visible area of the switch when it is in the off state.

offTintColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

onImage

Type: UIImage

The image to display when the switch is in the on state.

onImageTintColor

Type: UIColor

The tint color of the image.

onTintColor

Type: UIColor

The tint color of the visible area of the switch when it is in the on state.

onTintColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

pillCorners

Type: UIRectCorner

Apply a pill effect. Note this will override any effect of the 'corners' and 'cornerRadius' properties.

Options:

  • all
  • bottomleft
  • topleft
  • bottomright
  • topright

spacing

Type: decimal

The spacing to provide between the switch and the label in pt.

thumbTintColor

Type: UIColor

The tint color of the switch thumb.

thumbTintColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

tintColor

Type: UIColor

The tint color of the view.

tintColorAlpha

Type: decimal (0.0 - 1.0)

The alpha channel of the color.

toastAlertView

Type: RBToastAlertView

The theme of the managed toast alerts on the view.