mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
11 lines
499 B
TypeScript
11 lines
499 B
TypeScript
import * as listPickerModule from "tns-core-modules/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);
|
|
}
|