Class Index | File Index

Classes


Class TKLyricsController


Extends TKController.

A lyrics controller is designed to make it easy to flip through a collection of lyrics. This controller type automatically wires the left and right keys to navigate between songs, and the author should leverage the TKController.scrollableElement property to identify the container for the scrolling lyrics region. Loading of new song content should be done using the songDidChange method.


Defined in: LyricsController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The index of the current song.
 
The CSS selector for the element acting as the trigger to navigate to the next song.
 
The number of songs that the controller will be flipping through.
 
The CSS selector for the element acting as the trigger to navigate to the previous song.
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
 
Shows the next song.
 
Shows the previous song.
 
Triggered when a new song is displayed by the controller.
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
TKLyricsController(data)
Parameters:
{Object} data
A hash of properties to use as this object is initialized.
Since:
TuneKit 1.0
Field Detail
{int} currentSong
The index of the current song. Whenever this value changes, the songDidChange method is called.

{String} nextSongButton
The CSS selector for the element acting as the trigger to navigate to the next song.

{int} numberOfSongs
The number of songs that the controller will be flipping through.

{String} previousSongButton
The CSS selector for the element acting as the trigger to navigate to the previous song.
Method Detail
goToNextSong()
Shows the next song.

goToPreviousSong()
Shows the previous song.

songDidChange(song)
Triggered when a new song is displayed by the controller.
Parameters:
song

Copyright © 2009 Apple Inc. All rights reserved.