Class Index | File Index

Classes


Class TKTabController


Extends TKController.

A tab controller allows to bind a series of elements within the view, the tabs, to display each a given controller, the tab controller only allowing a single tab to be selected at once. Tabs are specified using the tabsSelector CSS selector, and a controller for each tab needs to be stored in the controllers array. By implementing the TKTabControllerDelegate protocol, a tab controller's delegate can track as the user navigates between tabs. At any given time, the selectedController property allows to find out which of the controllers is currently selected.


Defined in: TabController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The controllers managed by this tab controller, ordered in the same way as the elements matched by tabsSelector are.
 
The delegate for this tab controller, an object implementing the TKTabControllerDelegate protocol.
 
The selected controller.
 
The index of the selected tab.
 
A CSS selector matching the elements within the controller's view that should act as triggers to display the matching controller in the controllers array.
Fields borrowed from class TKController:
actions, backButton, becomesActiveTransition, becomesInactiveTransition, id, navigableElements, navigatesTo, outlets, parentController, preloads, scrollableElement, template
Method Summary
Method Attributes Method Name and Description
 
Indicates that a new tab has been activated at the given index.
Methods borrowed from class TKController:
addNavigableElement, customMetricsForElement, elementWasActivated, elementWasHighlighted, elementWasHovered, elementWasUnhighlighted, elementWasUnhovered, handleEvent, isDescendentOfController, isViewLoaded, keyWasPressed, preferredElementToHighlightInDirection, processView, removeNavigableElement, viewDidAppear, viewDidDisappear, viewDidLoad, viewWasInsertedIntoDocument, viewWillAppear, viewWillDisappear, wantsToHandleKey
Methods borrowed from class TKObject:
addPropertyObserver, callMethodNameAfterDelay, callSuper, notifyPropertyChange, removePropertyObserver
Class Detail
TKTabController(data)
Parameters:
{Object} data
A hash of properties to use as this object is initialized.
Since:
TuneKit 1.0
Field Detail
{Array} controllers
The controllers managed by this tab controller, ordered in the same way as the elements matched by tabsSelector are.

{Object} delegate
The delegate for this tab controller, an object implementing the TKTabControllerDelegate protocol.

{TKController} selectedController
The selected controller.

{int} selectedIndex
The index of the selected tab.

{String} tabsSelector
A CSS selector matching the elements within the controller's view that should act as triggers to display the matching controller in the controllers array.
Method Detail
tabAtIndexWasActivated(index)
Indicates that a new tab has been activated at the given index.
Parameters:
{int} index
The index for the tab that was just activated.

Copyright © 2009 Apple Inc. All rights reserved.