# GCKUIUtils Class

[Class Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#pub-static-methods) GCKUIUtils Class Reference

## Overview

User interface utility methods.

Since
:   3.0

Inherits NSObject.

|---|---|
| ## Class Method Summary ||
| (nullable UIViewController \*) | + [currentViewController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#a8a1fccf9f23a664915d0fd6353c144bd) |
|   | Returns the currently active view controller, by navigating through the view controller hierarchy beginning with the root view controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#a8a1fccf9f23a664915d0fd6353c144bd) |
|   ||
| (NSString \*) | + [timeIntervalAsString:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#aba20dac2503632862cb2ad2881be3aeb) |
|   | Formats a time interval in MM:SS or H:MM:SS format. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#aba20dac2503632862cb2ad2881be3aeb) |
|   ||
| (NSString \*) | + [localTimeAsString:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#ac47b0182e973e7c77d5540db4c47de36) |
|   | Formats a local time based on the current locale. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_utils#ac47b0182e973e7c77d5540db4c47de36) |
|   ||

## Method Detail

|---|---|---|---|
| + (nullable UIViewController \*) currentViewController |   |   |   |

Returns the currently active view controller, by navigating through the view controller hierarchy beginning with the root view controller.

|---|---|---|---|---|
| + (NSString \*) timeIntervalAsString: |   | (NSTimeInterval) | *timeInterval* |   |

Formats a time interval in MM:SS or H:MM:SS format.

|---|---|---|---|---|
| + (NSString \*) localTimeAsString: |   | (NSTimeInterval) | *localTime* |   |

Formats a local time based on the current locale.

Since
:   4.3.4