# GCKUIPlayPauseToggleController Class

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#pub-methods) \| [Properties](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#properties) GCKUIPlayPauseToggleController Class Reference

## Overview

A class that can be used to implement a custom play/pause toggle UI, in situations where a [GCKUIMultistateButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button "A subclass of UIButton that supports multiple states. ") will not suffice.

The application may either subclass this class and override the [GCKUIPlayPauseToggleController::playPauseState](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#a64f0f8b474ee9cb85a8458694c6dcf65 "The current play/pause state of the GCKRemoteMediaClient. ") and [GCKUIPlayPauseToggleController::inputEnabled](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#ac56ec8a8b78b48e7c2cb02b20115ebdb "The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this ...") setters, or use KVO to listen for changes to these properties, and update its play/pause UI control(s) accordingly.

Since
:   3.4

Inherits NSObject.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - [init](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#a64f309fa39dada01b3956e172d65b30f) |
|   | Designated initializer. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#a64f309fa39dada01b3956e172d65b30f) |
|   ||

|---|---|
| ## Property Summary ||
| [GCKUIPlayPauseState](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_play_pause_toggle_controller_8h#a5fb82340e0cb27757322006b7fbe0380) | [playPauseState](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#a64f0f8b474ee9cb85a8458694c6dcf65) |
|   | The current play/pause state of the [GCKRemoteMediaClient](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_remote_media_client "A class for controlling media playback on a Cast receiver. "). [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#a64f0f8b474ee9cb85a8458694c6dcf65) |
|   ||
| BOOL | [inputEnabled](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#ac56ec8a8b78b48e7c2cb02b20115ebdb) |
|   | The [GCKUIMediaController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller "A controller for UI views that are used to control or display the status of media playback on a Cast ...") writes this property to enable or disable the UI control(s) managed by this controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller#ac56ec8a8b78b48e7c2cb02b20115ebdb) |
|   ||

## Method Detail

|---|---|---|---|
| - (instancetype) init |   |   |   |

Designated initializer.

## Property Detail

|---|---|
| |---| | - ([GCKUIPlayPauseState](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_play_pause_toggle_controller_8h#a5fb82340e0cb27757322006b7fbe0380)) playPauseState | | readwritenonatomicassign |

The current play/pause state of the [GCKRemoteMediaClient](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_remote_media_client "A class for controlling media playback on a Cast receiver. ").

The [GCKUIMediaController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller "A controller for UI views that are used to control or display the status of media playback on a Cast ...") writes this property whenever the receiver's play/pause state changes. It observes the property (unless it is in the process of writing it) and if it changes, it issues the appropriate media command with the [GCKRemoteMediaClient](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_remote_media_client "A class for controlling media playback on a Cast receiver. ") to change the receiver's player state accordingly.

|---|---|
| |---| | - (BOOL) inputEnabled | | readwritenonatomicassign |

The [GCKUIMediaController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller "A controller for UI views that are used to control or display the status of media playback on a Cast ...") writes this property to enable or disable the UI control(s) managed by this controller.

Media-related UI controls are temporarily disabled while a media command is in-flight.