This is the on-screen representation of a generic picker.
全てのデバイスで同じような一般レイアウトを持つが、印象はデバイス固有である印象を与える。 ピッカーは一つもしくはそれ以上の選択するオブジェクト、タイトル、次・前を表す矢印、そして確認ボタンで構成される。次・前矢印と確認ボタンはデバイス固有だが、もし必要なら上書きできる。ピッカーは WatchUi.pushView() でプッシュされ、PickerDelegate 。各選択値に何を表示するかために、PickerFactory が必要になる
A Picker uses a PickerFactory to decide what to display to the user. It is capable of displaying any number of entries for the user to choose from. For instance, if the PickerFactory was [new NumberFactory(), new Ui.Text(:text=>“-”), new NumberFactory()] then the Picker will have three entries: a choosable number, a non-choosable “-”, and another choosable number.
Instance Method Summary
- (Picker) initialize(options) constructor : Constructor.
- (Object) setOptions(options) : Set the options for the Picker.
Methods inherited from View
#findDrawableById
, #onHide, #onLayout, #onShow, #onUpdate, #setLayout
Constructor Details
- (Picker) initialize(options)
Constructor
Parameters:
options (Dictionary) —
@see Picker#setOptions
Since:
1.2.0
Instance Method Details
- (Object) setOptions(options)
Set the options for the Picker.
Parameters:
options (Dictionary) —
the options for the Picker
Options Hash (options):
:title (Drawable) —
the title for the Picker. Required.
:pattern (Array) —
an Array of [Object] for the Picker to display. If the Array entry is a PickerFactory then it is presented to the user to make a choice. If it is a Drawable then it is display only. Required.
:defaults (Array) —
an Array of [Number] indicating the starting index for each entry in :pattern. Optional.
:nextArrow (Drawable) —
a custom next icon for the Picker. Optional.
:previousArrow (Drawable) —
a custom previous icon for the Picker. Optional.
:confirm (Drawable) —
a custom confirm icon for the Picker. Optional.
Since:
1.2.0
Generated on Thu Feb 18 15:00:18 2016 by yard 0.8.7.6 (ruby-2.2.1).
最終更新:2016年03月12日 01:41