FireTVSelectionWireframe
public struct FireTVSelectionWireframe : FireTVSelectionWireframeProtocol
Responsible for making a FireTVSelectionViewController
and configuring an implementation of FireTVSelectionViewProtocol
-
makeViewController(theme:playerId:media:delegate:noDevicesText:noWifiAlertTitle:noWifiAlertMessage:)
Makes a
FireTVSelectionViewController
Throws
an error if something unexpected happensDeclaration
Swift
public static func makeViewController(theme: FireTVSelectionThemeProtocol, playerId: String, media: FireTVMedia?, delegate: FireTVSelectionDelegateProtocol, noDevicesText: String, noWifiAlertTitle: String, noWifiAlertMessage: String) throws -> UINavigationController
Parameters
theme
theme for the view controller
playerId
player id to be searched for
media
media to be played on player selection
delegate
delegate which will be notified about actions
noDevicesText
a custom no devices text
noWifiAlertTitle
a custom title for the no wifi alert
noWifiAlertMessage
a custom message for the no wifi alert
Return Value
a
UINavigationController
with aFireTVSelectionViewController
as the root view controller -
Configures the given view to be ready to go
Throws
an error if something weird happensDeclaration
Swift
public static func configureView(_ view: FireTVSelectionViewProtocol, theme: FireTVSelectionThemeProtocol, playerId: String, media: FireTVMedia?, delegate: FireTVSelectionDelegateProtocol, noDevicesText: String, noWifiAlertTitle: String, noWifiAlertMessage: String) throws
Parameters
view
view to be configured
theme
theme for the view
playerId
player id to be searched for
media
media to play on selected player
delegate
delegate which will be notified about actions
noDevicesText
custom text to show if no devices were found
noWifiAlertTitle
custom title to show in no wifi alert
noWifiAlertMessage
custom message to show in no wifi alert
-
Makes a
FireTVSelectionViewController
using default string values for thenoDevicesText
(No devices found
), thenoWifiAlertTitle
(Error
) and thenoWifiAlertMessage
(You are not connected to a wifi network. The connection is required.
)Throws
an error if something unexpected happensDeclaration
Swift
public static func makeViewController(theme: FireTVSelectionThemeProtocol, playerId: String, media: FireTVMedia?, delegate: FireTVSelectionDelegateProtocol) throws -> UINavigationController
Parameters
theme
theme for the view controller
playerId
player id to be searched for
media
media to be played on player selection
delegate
delegate which will be notified about actions
Return Value
a
UINavigationController
with aFireTVSelectionViewController
as the root view controller -
Configures the given view to be ready to go using default string values for the
noDevicesText
(No devices found
), thenoWifiAlertTitle
(Error
) and thenoWifiAlertMessage
(You are not connected to a wifi network. The connection is required.
)Throws
an error if something weird happensDeclaration
Swift
public static func configureView(_ view: FireTVSelectionViewProtocol, theme: FireTVSelectionThemeProtocol, playerId: String, media: FireTVMedia?, delegate: FireTVSelectionDelegateProtocol) throws
Parameters
view
view to be configured
theme
theme for the view
playerId
player id to be searched for
media
media to play on selected player
delegate
delegate which will be notified about actions