iOS Guides | Samples

MonoTouch.UIKit.UIPickerView Class

A UIView that displays a spinning wheel control used to select data.

See Also: UIPickerView

Syntax

[MonoTouch.Foundation.Register("UIPickerView", true)]
[MonoTouch.ObjCRuntime.Unavailable(MonoTouch.ObjCRuntime.PlatformName.TvOS, MonoTouch.ObjCRuntime.PlatformArchitecture.All, null)]
public class UIPickerView : UIView, IUITableViewDataSource, IDisposable

Remarks

Customizing Appearance

The appearance of the UIPickerView can be customized by using the UIPickerView+UIPickerViewAppearance class or by overriding the UIPickerViewModel.GetView and UIPickerViewModel.GetRowHeight methods in the UIPickerViewModel, as shown in the "Standard Controls" sample ("Picker With Custom Appearance").

Related content

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UIPickerView are listed below.

See Also: UIView

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
Initializes the UIPickerView with the specified frame.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
static
AppearanceUIPickerView+UIPickerViewAppearance. Strongly-typed property that returns the UIAppearance class for this class.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
DataSourceNSObject. The UIPickerViewDataSource that provides elements to this UIPickerView.
DelegateUIPickerViewDelegate. An instance of the MonoTouch.UIKit.UIPickerViewDelegate model class which acts as the class delegate.
ModelUIPickerViewModel. The UIPickerViewModel that this UIPickerView is representing.
[read-only]
NumberOfComponentsInt32. The number of elements in this UIPickerView.
ShowSelectionIndicatorBoolean. Displays the selection indicator.
SourceUIPickerViewModel. The UIPickerViewModel that UIPickerViewModel that this UIPickerView is representing.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

static
AppearanceWhenContainedIn(params Type[]) : UIPickerView+UIPickerViewAppearance
Returns a strongly typed UIAppearance for instances of this class when the view is hosted in the specified hierarchy.
static
GetAppearance(UITraitCollection) : UIPickerView+UIPickerViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance(UITraitCollection, params Type[]) : UIPickerView+UIPickerViewAppearance
Returns an appearance proxy for the specified traits when found in the containers containment hierarchy.
static
GetAppearance<T>() : UIPickerView+UIPickerViewAppearance
Obtains the appearance proxy UIPickerViewAppearance for the subclass of UIPickerView.
static
GetAppearance<T>(UITraitCollection) : UIPickerView+UIPickerViewAppearance
Obtains the appearance proxy UIPickerViewAppearance for the subclass of UIPickerView.
static
GetAppearance<T>(UITraitCollection, params Type[]) : UIPickerView+UIPickerViewAppearance
Obtains the appearance proxy UIPickerViewAppearance for the subclass of UIPickerView that has the specified trait collection when the view is hosted in the specified hierarchy.
GetCell(UITableView, NSIndexPath) : UITableViewCell
ReloadAllComponents()
Reloads all the data associated with this UIPickerView.
ReloadComponent(Int32)
Reloads the data relating to the specified component.
RowsInComponent(Int32) : Int32
The number of rows in the specified component.
RowsInSection(UITableView, Int32) : Int32
RowSizeForComponent(Int32) : SizeF
The SizeF for rows in the component. Typically, the size required to display the largest string or view used as a row in the component.
Select(Int32, Int32, Boolean)
Selects the specified row.
SelectedRowInComponent(Int32) : Int32
The selected row in the specified component.
ViewFor(Int32, Int32) : UIView
The UIView for the specified row and component.

Protected Methods

override
Dispose(Boolean)
Releases the resources used by the UIPickerView object.