Files
NativeScript/tests/app/ui/list-picker/list-picker-tests-native.ios.ts
2016-12-19 10:36:25 +02:00

11 lines
482 B
TypeScript

import * as listPickerModule from "ui/list-picker";
export function getNativeItemsCount(listPicker: listPickerModule.ListPicker): number {
return listPicker.ios.numberOfRowsInComponent(0);
}
export function selectNativeItem(listPicker: listPickerModule.ListPicker, index: number): void {
listPicker.ios.selectRowInComponentAnimated(index, 0, false);
(<UIPickerViewDelegate>(<any>listPicker)._delegate).pickerViewDidSelectRowInComponent(listPicker.ios, index, 0);
}