C# Class tvFocus.ViewController

Controls the main View for the app and is responsible for setting up a Foucs Guide UIFocusGuide that allows the user to move between the More Info and Buy button in the User Interface.
Inheritance: UIViewController
Datei anzeigen Open project: xamarin/monotouch-samples

Public Properties

Property Type Description
FocusGuide UIFocusGuide

Private Properties

Property Type Description
BuyButton_PrimaryActionTriggered void
BuyButton_PrimaryActionTriggered void
MoreInfoButton_PrimaryActionTriggered void
MoreInfoButton_PrimaryActionTriggered void
ReleaseDesignerOutlets void

Public Methods

Method Description
DidUpdateFocus ( UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator ) : void

Called after the Focus Engine has been called to change the Focus from an existing item to a new item.

We are telling the Focus Guide where to move focus to from this method.

ViewController ( IntPtr handle ) : System

Initializes a new instance of the T:tvFocus.ViewController class.

ViewDidLoad ( ) : void

Called directly after the VIew has been loaded into memory and allows you to initialize the view.

We are building the Focus Guide here and attaching it to the view.

Private Methods

Method Description
BuyButton_PrimaryActionTriggered ( UIButton sender ) : void

This action is triggered when the Buy button is clicked using the Apple Remote.

BuyButton_PrimaryActionTriggered ( UIKit sender ) : void
MoreInfoButton_PrimaryActionTriggered ( UIButton sender ) : void

This action is triggered when the More Info button is clicked using the Apple Remote.

MoreInfoButton_PrimaryActionTriggered ( UIKit sender ) : void
ReleaseDesignerOutlets ( ) : void

Method Details

DidUpdateFocus() public method

Called after the Focus Engine has been called to change the Focus from an existing item to a new item.
We are telling the Focus Guide where to move focus to from this method.
public DidUpdateFocus ( UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator ) : void
context UIFocusUpdateContext The context of the movement.
coordinator UIFocusAnimationCoordinator An Animation Coordinator that you can use to animat the focus change.
return void

ViewController() public method

Initializes a new instance of the T:tvFocus.ViewController class.
public ViewController ( IntPtr handle ) : System
handle System.IntPtr Handle.
return System

ViewDidLoad() public method

Called directly after the VIew has been loaded into memory and allows you to initialize the view.
We are building the Focus Guide here and attaching it to the view.
public ViewDidLoad ( ) : void
return void

Property Details

FocusGuide public_oe property

Private storage for the Focus Guide that will allow us to move between buttons.
public UIFocusGuide FocusGuide
return UIFocusGuide