SCLFlicButton Class Reference

Inherits from NSObject
Declared in SCLFlicButton.h

Overview

@class SCLFlicButton

An instance of this class represents a physical flic. All commands will be directly passed to the physical flic and any events occurring on the flic will be passed along using the specified delegate methods.

  delegate

@property delegate

@property (weak, nonatomic, nullable) id<SCLFlicButtonDelegate> delegate

Discussion

The delegate object that will receive events related to this particular flic.

Declared In

SCLFlicButton.h

  buttonIdentifier

@property buttonIdentifier

@property (readonly, nonatomic, strong, nonnull) NSUUID *buttonIdentifier

Discussion

The virtual ID of the flic.

Declared In

SCLFlicButton.h

  buttonPublicKey

@property buttonPublicKey

@property (readonly, nonatomic, strong, nonnull) NSString *buttonPublicKey

Discussion

The public key of the flic. This in the key that is used to identify the flic on our backend.

Declared In

SCLFlicButton.h

  name

@property name

@property (atomic, readonly, strong, nonnull) NSString *name

Discussion

The Bluetooth device name of the flic button.

Declared In

SCLFlicButton.h

  color

@property color

@property (atomic, readonly, strong, nonnull) UIColor *color

Discussion

The actual color of the grabbed Flic button. If for some reason the real color is not available, such as if the button was already grabbed with an earlier version of fliclib, then the color will default to white.

Declared In

SCLFlicButton.h

  userAssignedName

@property userAssignedName

@property (atomic, readonly, strong, nonnull) NSString *userAssignedName

Discussion

This is the user assigned name of the Flic button that is assigned and displayed in the Flic App.

Declared In

SCLFlicButton.h

  connectionState

@property state

@property (atomic, readonly) SCLFlicButtonConnectionState connectionState

Discussion

The current state of the flic.

Declared In

SCLFlicButton.h

  lowLatency

@property lowLatency

@property (nonatomic, readwrite) BOOL lowLatency

Discussion

The latency setting for this button. If you set this to YES then you will get lower latency on the click events when your is in the foreground. As soon as the app leaves the foreground it will be set back to the regular latency setting. Please only use this if you have a very good reason for it, such as if you are designing a foreground game that requires it. Battery consumption will increase with this activated.

Declared In

SCLFlicButton.h

  triggerBehavior

@property triggerBehavior

@property (nonatomic, readwrite) SCLFlicButtonTriggerBehavior triggerBehavior

Discussion

This property specifies how the flic press events should be handled. You are allowed to change this property any time you want. Take a look at SCLFlicButtonTriggerBehavior to see the options available.

Declared In

SCLFlicButton.h

  pressCount

@property pressCount

@property (nonatomic, readonly) int pressCount

Discussion

This property specifies how many times the flic has been toggled at any given time. This will register all down events as well as the up events, which means that if you want to know how many times it has been clicked then you have to divide this number by two. Also, this property will always contain the last known registered value, meaning that if the flic has been pressed while not being within proximity then the property will of course not be up to date. It will be updated as soon as the flic connects the next time. Important notice: Even though this value is represented by an int the internal counter only consists of 3 bytes meaning that the counter will rollover at 0xffffff (16777215). However, it is highly unlikely that anyone will ever reach those numbers. The presscounter will be reset if a factory reset is done on the physical flic button.

Declared In

SCLFlicButton.h

  isReady

@property isReady

@property (readonly) BOOL isReady

Discussion

This property lets you know wether the Flic is ready or not.

Declared In

SCLFlicButton.h

– connect

@method connect:

- (void)connect

Discussion

Attempts to connect the flic. If the flic is not available, due to either being out of range or not advertising, then the flic will be connected once it becomes available since this call will not time out, also called a pending connection. It can be canceled by calling the disconnect method.

Declared In

SCLFlicButton.h

– disconnect

@method disconnect:

- (void)disconnect

Discussion

Disconnect a currently connected flic or cancel a pending connection.

Declared In

SCLFlicButton.h

– indicateLED:

@method indicateLED:

- (void)indicateLED:(SCLFlicButtonLEDIndicateCount)count

Parameters

count

Decides how many times the LED will indicate (fade)

Discussion

Use this method when you want to indicate something to the user by fading the LED. Be mindful with battery usage. This will only work if the Flic is connected.

Declared In

SCLFlicButton.h

– readRSSI

@method readRSSI

- (void)readRSSI

Discussion

A call to this method will read the RSSI (received signal strength indication) of the flic while it is currently connected. A callback will be sent to the SCLFlicButton delegate once the value has been updated. This value is represented in decibels and has an effective range from -100 to 0.

Declared In

SCLFlicButton.h