mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
12 lines
488 B
TypeScript
12 lines
488 B
TypeScript
import listPickerModule = require("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);
|
|
}
|
|
|
|
|