API Reference / iOS InstantSearch Widgets / Numeric Filters
Apr. 11, 2019

Numeric Filters

About this widget

Numeric Refinements are widgets that handle numeric filters. Possible ones are:

  • SliderWidget, which inherits from UISlider.
  • StepperWidget, which inherits from UIStepper.
  • DatePickerWidget, which inherits from UIDatePicker.

Examples

1
2
3
4
var slider = SliderWidget(frame: CGRect)
slider.attribute = "price"
slider.operator = ">"
slider.inclusive = true

Parameters

attribute
type: string
default:
Required

The numeric attribute used by the widget.

1
numericWidget.attribute = "price"
operator
type: string
default:
Required

The numeric operator to apply to the filter. Possible ones are <, <=, ==, !=, >= and >.

1
numericWidget.operator = ">"
inclusive
type: Bool
default: true
Optional

Whether the refinement is inclusive or exclusive.

1
numericWidget.inclusive = true

NumericControlViewModel

Customizes any kind of numeric control view.

Methods

  • updateNumeric(value:doSearch:)
  • removeNumeric(value:)

Did you find this page helpful?