GCKUIMiniMediaControlsViewController 类

GCKUIMiniMediaControlsViewController 类参考

概览

一个实现“正在播放”控制栏的视图控制器。

在其默认配置中,它会显示当前媒体项的缩略图、标题和副标题、流进度条和播放/暂停切换按钮。

如需了解委托协议,请参阅 GCKUIMiniMediaControlsViewControllerDelegate

辛塞
3.0

继承 UIViewController。实现了 <GCKUIMediaButtonBarProtocol>

实例方法摘要

(NSUInteger) - buttonCount
 接收器可以自定义的按钮数量上限。更多...
 
(void) - setButtonType:atIndex:
 设置位置 index 的按钮的按钮类型。更多...
 
(GCKUIMediaButtonType- buttonTypeAtIndex:
 返回指定位置的当前按钮类型。更多...
 
(void) - setCustomButton:atIndex:
 设置应在给定按钮位置展示的 UIButton 实例。更多...
 
(UIButton *__nullable) - customButtonAtIndex:
 返回对指定位置上的自定义按钮的引用。更多...
 

属性摘要

id< GCKUIMiniMediaControlsViewControllerDelegatedelegate
 视图控制器的增量,通常负责在适当的情况下展示和隐藏此控制条的全屏视图控制器。更多...
 
BOOL thumbnailEnabled
 是否应显示缩略图。更多...
 
BOOL active
 指示控制栏的显示状态。更多...
 
CGFloat minHeight
 此视图应呈现的最小(和首选)高度。更多...
 

方法详细信息

- (NSUInteger) buttonCount

接收器可以自定义的按钮数量上限。

返回
按钮数量。
- (void) setButtonType: (GCKUIMediaButtonType buttonType
atIndex: (NSUInteger)  index 

设置位置 index 的按钮的按钮类型。

Parameters
buttonTypeThe type of the button. If the type is GCKUIMediaButtonTypeCustom, a UIButton instance should be passed for the same index using setCustomButton:atIndex:. Otherwise a default button is created and presented in that position.
indexThe position in which the button should be presented. 0 is the left-most position. Indices should be smaller than the value returned by buttonCount.
- (GCKUIMediaButtonType) buttonTypeAtIndex: (NSUInteger)  index

返回指定位置的当前按钮类型。

Parameters
indexThe button's position, where 0 is the left-most position.
返回
所选位置处的按钮类型。
- (void) setCustomButton: (UIButton *__nullable)  customButton
atIndex: (NSUInteger)  index 

设置应在给定按钮位置展示的 UIButton 实例。

Parameters
customButtonThe button instance to be presented in the control bar.
indexThe position in which the button should be presented. 0 is the left-most position. Indices should be smaller than the value returned by buttonCount.
- (UIButton *__nullable) customButtonAtIndex: (NSUInteger)  index

返回对指定位置上的自定义按钮的引用。

Parameters
indexThe button's position, where 0 is the right-most position.
返回
对所选位置处的按钮的引用,如果此位置没有自定义按钮,或位置无效,则为 nil

属性详情

- (id<GCKUIMiniMediaControlsViewControllerDelegate>) delegate
readwritenonatomicweak

视图控制器的增量,通常负责在适当的情况下展示和隐藏此控制条的全屏视图控制器。

- (BOOL) thumbnailEnabled
readwritenonatomicassign

是否应显示缩略图。

默认情况下,此属性会设置为 YES

- (BOOL) active
readnonatomicassign

指示控制栏的显示状态。

处于 YES 状态时,系统将投放可以由控制栏控制的媒体,并使其可见。当 NO 时,应隐藏控制栏。

- (CGFloat) minHeight
readnonatomicassign

此视图应呈现的最小(和首选)高度。