-
Notifications
You must be signed in to change notification settings - Fork 13
searchView
Wesley De Groot edited this page Nov 24, 2015
·
6 revisions
evaluateScripts(['https://wdg.github.io/tvOS.js/tvOS.js'], function (success) {
if (success) {
var myArray = []
myArray.push({
title: 'test 1',
image: 'https://www.wdgwv.com/logo.png'
})
myArray.push({
title: 'test 2',
image: 'https://www.wdgwv.com/logo.png'
})
myArray.push({
title: 'test 3',
image: 'https://www.wdgwv.com/logo.png'
})
// search, results, items, callback_on_search, callback_on_select
tvOS.searchView(' Search', 'TV Demo Results', myArray, function (e) {
console.log('Searched: ' + e)
}, function (e) {
console.log('Clicked: ' + e)
if (e === 'test 2') {
tvOS.location('https://wdg.github.io/tvOS.js/index.js')
}
})
} else {
console.log('Missing it all!')
}
})
Go to: issues/7
Wesley de Groot • CC-BY 4.0