Skip to content

UIColorWell() constructor ​

The UIColorWell() constructor creates a color well.

Syntax ​

new UIColorWell()

Parameters ​

None.

Return value ​

A new UIColorWell with the following property values (measured in the simulator):

PropertyValue
titlenull
selectedColornull
supportsAlphatrue
supportsEyedroppertrue
maximumLinearExposure0

It's an instance of UIControl and UIView. Give it a position and size before adding it to a view controller.

Exceptions ​

TypeError

Subclassing it and calling new: class X extends UIColorWell {} throws on new X(). See Native classes.

Examples ​

js
const well = new UIColorWell();
console.log(well instanceof UIControl, well.selectedColor);

Result: prints true null.

Corresponding iOS API ​

-[UIColorWell init].

See also ​