SFormPickerField Class Reference

Inherits from SFormField : NSObject
Declared in SFormPickerField.h
Availability
Related samples

Overview

Represents the underlying model for a picker field.

The value property of this class is an NSArray containing the indicies (represented as an NSNumber) of the selected components in the picker. There can be multiple incidies because a picker can have multiple columns.

This class is compatible with validators that conform to SFormPickerFieldValidator.

Properties

options

An NSArray of NSArrays that contain the options for a picker.

@property (nonatomic, strong) NSArray *options

Discussion

Each NSArray inside of the ‘options’ array should contain values to be displayed in the picker. These values can be either a NSString, or a NSNumber.

Declared In

SFormPickerField.h

value

The current value of the field.

@property (nonatomic, copy) NSArray *value

Discussion

This is an array of NSNumber objects representing the index of each picker.

Declared In

SFormPickerField.h

Instance Methods

initWithTitle:options:

Create a picker field with the given options.

- (instancetype)initWithTitle:(NSString *)title options:(NSArray *)options

Parameters

title

The field’s title.

options

The options to initialize the field with.

Discussion

This is the designated initializer.

Declared In

SFormPickerField.h